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

Unified Diff: cc/gl_renderer.cc

Issue 12545018: Move context-related callbacks into OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 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 side-by-side diff with in-line comments
Download patch
Index: cc/gl_renderer.cc
diff --git a/cc/gl_renderer.cc b/cc/gl_renderer.cc
index 7db40b83a90d5a571e3cfe453958e26b1b9d5fe0..1f1749bdd4e2724b81a087e11536c12797057e65 100644
--- a/cc/gl_renderer.cc
+++ b/cc/gl_renderer.cc
@@ -111,7 +111,6 @@ bool GLRenderer::initialize()
if (!m_context->makeContextCurrent())
return false;
- m_context->setContextLostCallback(this);
m_context->pushGroupMarkerEXT("CompositorContext");
std::string extensionsString = UTF16ToASCII(m_context->getString(GL_EXTENSIONS));
@@ -127,12 +126,6 @@ bool GLRenderer::initialize()
m_capabilities.usingPartialSwap = settings().partialSwapEnabled && extensions.count("GL_CHROMIUM_post_sub_buffer");
- // Use the swapBuffers callback only with the threaded proxy.
- if (m_client->hasImplThread())
- m_capabilities.usingSwapCompleteCallback = extensions.count("GL_CHROMIUM_swapbuffers_complete_callback");
- if (m_capabilities.usingSwapCompleteCallback)
- m_context->setSwapBuffersCompleteCallbackCHROMIUM(this);
-
m_capabilities.usingSetVisibility = extensions.count("GL_CHROMIUM_set_visibility");
if (extensions.count("GL_CHROMIUM_iosurface"))
@@ -173,9 +166,7 @@ bool GLRenderer::initialize()
GLRenderer::~GLRenderer()
{
- m_context->setSwapBuffersCompleteCallbackCHROMIUM(0);
m_context->setMemoryAllocationChangedCallbackCHROMIUM(0);
- m_context->setContextLostCallback(0);
cleanupSharedObjects();
}
@@ -1379,15 +1370,6 @@ bool GLRenderer::swapBuffers()
return true;
}
-void GLRenderer::receiveCompositorFrameAck(const CompositorFrameAck& ack) {
- onSwapBuffersComplete();
-}
-
-void GLRenderer::onSwapBuffersComplete()
-{
- m_client->onSwapBuffersComplete();
-}
-
void GLRenderer::onMemoryAllocationChanged(WebGraphicsMemoryAllocation allocation)
{
// Just ignore the memory manager when it says to set the limit to zero
@@ -1464,12 +1446,6 @@ void GLRenderer::ensureBackbuffer()
m_isBackbufferDiscarded = false;
}
-void GLRenderer::onContextLost()
-{
- m_client->didLoseOutputSurface();
-}
-
-
void GLRenderer::getFramebufferPixels(void *pixels, const gfx::Rect& rect)
{
DCHECK(rect.right() <= viewportWidth());
« no previous file with comments | « cc/gl_renderer.h ('k') | cc/gl_renderer_pixeltest.cc » ('j') | cc/output_surface.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698