diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 22:06:01 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-17 22:06:01 +0000 |
commit | bb1e282c1c62409dcc92e277545c2048685f1ea6 (patch) | |
tree | 4547988f797be8031db359a23e48c6562a74abaf /cc/output/gl_renderer.cc | |
parent | 028ddd6524e941a290b831fb56a9115dc5a95a4b (diff) | |
download | chromium_src-bb1e282c1c62409dcc92e277545c2048685f1ea6.zip chromium_src-bb1e282c1c62409dcc92e277545c2048685f1ea6.tar.gz chromium_src-bb1e282c1c62409dcc92e277545c2048685f1ea6.tar.bz2 |
Move swapcomplete callback into OutputSurface
Things like swap are concepts of an OutputSurface, not a context. Moving the
callbacks to OutputSurface will also reduce cc's knowledge of the context
guts and let us swap out the GL interface.
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=194394
Review URL: https://codereview.chromium.org/12545018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194700 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/output/gl_renderer.cc')
-rw-r--r-- | cc/output/gl_renderer.cc | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index 5a70f38..dcd952a 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc @@ -119,7 +119,6 @@ bool GLRenderer::Initialize() { if (!context_->makeContextCurrent()) return false; - context_->setContextLostCallback(this); context_->pushGroupMarkerEXT("CompositorContext"); std::string extensions_string = @@ -144,8 +143,6 @@ bool GLRenderer::Initialize() { if (client_->HasImplThread()) capabilities_.using_swap_complete_callback = extensions.count("GL_CHROMIUM_swapbuffers_complete_callback") > 0; - if (capabilities_.using_swap_complete_callback) - context_->setSwapBuffersCompleteCallbackCHROMIUM(this); capabilities_.using_set_visibility = extensions.count("GL_CHROMIUM_set_visibility") > 0; @@ -191,9 +188,7 @@ bool GLRenderer::Initialize() { } GLRenderer::~GLRenderer() { - context_->setSwapBuffersCompleteCallbackCHROMIUM(NULL); context_->setMemoryAllocationChangedCallbackCHROMIUM(NULL); - context_->setContextLostCallback(NULL); CleanupSharedObjects(); } @@ -1889,12 +1884,6 @@ bool GLRenderer::SwapBuffers() { return true; } -void GLRenderer::ReceiveCompositorFrameAck(const CompositorFrameAck& ack) { - onSwapBuffersComplete(); -} - -void GLRenderer::onSwapBuffersComplete() { client_->OnSwapBuffersComplete(); } - void GLRenderer::onMemoryAllocationChanged( WebGraphicsMemoryAllocation allocation) { // Just ignore the memory manager when it says to set the limit to zero @@ -1972,8 +1961,6 @@ void GLRenderer::EnsureBackbuffer() { is_backbuffer_discarded_ = false; } -void GLRenderer::onContextLost() { client_->DidLoseOutputSurface(); } - void GLRenderer::GetFramebufferPixels(void* pixels, gfx::Rect rect) { DCHECK(rect.right() <= ViewportWidth()); DCHECK(rect.bottom() <= ViewportHeight()); |