Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp

Issue 1809553002: blink: Remove unused or rarely used methods from WebGraphicsContext3D (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wgc3d
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 4985 matching lines...) Expand 10 before | Expand all | Expand 10 after
4996 return; 4996 return;
4997 4997
4998 m_contextLostMode = mode; 4998 m_contextLostMode = mode;
4999 ASSERT(m_contextLostMode != NotLostContext); 4999 ASSERT(m_contextLostMode != NotLostContext);
5000 m_autoRecoveryMethod = autoRecoveryMethod; 5000 m_autoRecoveryMethod = autoRecoveryMethod;
5001 5001
5002 if (mode == RealLostContext) { 5002 if (mode == RealLostContext) {
5003 // Inform the embedder that a lost context was received. In response, th e embedder might 5003 // Inform the embedder that a lost context was received. In response, th e embedder might
5004 // decide to take action such as asking the user for permission to use W ebGL again. 5004 // decide to take action such as asking the user for permission to use W ebGL again.
5005 if (LocalFrame* frame = canvas()->document().frame()) 5005 if (LocalFrame* frame = canvas()->document().frame())
5006 frame->loader().client()->didLoseWebGLContext(webContext()->getGraph icsResetStatusARB()); 5006 frame->loader().client()->didLoseWebGLContext(contextGL()->GetGraphi csResetStatusKHR());
5007 } 5007 }
5008 5008
5009 // Make absolutely sure we do not refer to an already-deleted texture or fra mebuffer. 5009 // Make absolutely sure we do not refer to an already-deleted texture or fra mebuffer.
5010 drawingBuffer()->setTexture2DBinding(0); 5010 drawingBuffer()->setTexture2DBinding(0);
5011 drawingBuffer()->setFramebufferBinding(GL_FRAMEBUFFER, 0); 5011 drawingBuffer()->setFramebufferBinding(GL_FRAMEBUFFER, 0);
5012 5012
5013 detachAndRemoveAllObjects(); 5013 detachAndRemoveAllObjects();
5014 5014
5015 // Lose all the extensions. 5015 // Lose all the extensions.
5016 for (size_t i = 0; i < m_extensions.size(); ++i) { 5016 for (size_t i = 0; i < m_extensions.size(); ++i) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
5067 { 5067 {
5068 if (!isContextLost() && drawingBuffer()) { 5068 if (!isContextLost() && drawingBuffer()) {
5069 drawingBuffer()->setFilterQuality(filterQuality); 5069 drawingBuffer()->setFilterQuality(filterQuality);
5070 } 5070 }
5071 } 5071 }
5072 5072
5073 Extensions3DUtil* WebGLRenderingContextBase::extensionsUtil() 5073 Extensions3DUtil* WebGLRenderingContextBase::extensionsUtil()
5074 { 5074 {
5075 if (!m_extensionsUtil) { 5075 if (!m_extensionsUtil) {
5076 WebGraphicsContext3D* context = webContext(); 5076 WebGraphicsContext3D* context = webContext();
5077 gpu::gles2::GLES2Interface* gl = context->getGLES2Interface(); 5077 gpu::gles2::GLES2Interface* gl = contextGL();
5078 m_extensionsUtil = Extensions3DUtil::create(context, gl); 5078 m_extensionsUtil = Extensions3DUtil::create(context, gl);
5079 // The only reason the ExtensionsUtil should be invalid is if the webCon text is lost. 5079 // The only reason the ExtensionsUtil should be invalid is if the webCon text is lost.
5080 ASSERT(m_extensionsUtil->isValid() || gl->GetGraphicsResetStatusKHR() != GL_NO_ERROR); 5080 ASSERT(m_extensionsUtil->isValid() || gl->GetGraphicsResetStatusKHR() != GL_NO_ERROR);
5081 } 5081 }
5082 return m_extensionsUtil.get(); 5082 return m_extensionsUtil.get();
5083 } 5083 }
5084 5084
5085 void WebGLRenderingContextBase::removeSharedObject(WebGLSharedObject* object) 5085 void WebGLRenderingContextBase::removeSharedObject(WebGLSharedObject* object)
5086 { 5086 {
5087 m_contextGroup->removeObject(object); 5087 m_contextGroup->removeObject(object);
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
6288 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1); 6288 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, 1);
6289 } 6289 }
6290 6290
6291 void WebGLRenderingContextBase::restoreUnpackParameters() 6291 void WebGLRenderingContextBase::restoreUnpackParameters()
6292 { 6292 {
6293 if (m_unpackAlignment != 1) 6293 if (m_unpackAlignment != 1)
6294 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment); 6294 webContext()->pixelStorei(GL_UNPACK_ALIGNMENT, m_unpackAlignment);
6295 } 6295 }
6296 6296
6297 } // namespace blink 6297 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698