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

Unified Diff: cc/output/gl_renderer.cc

Issue 12545018: Move context-related callbacks into OutputSurface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit test Created 7 years, 8 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
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer.cc
diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc
index 5a70f384d3f2031013416db44c8bb6a3c838c94d..dcd952adb8ac253839972247fb582e43910234a4 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());
« no previous file with comments | « cc/output/gl_renderer.h ('k') | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698