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

Unified Diff: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc

Issue 8139020: Turning the threaded compositor into a runtime option. This CL (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | « no previous file | content/renderer/render_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
===================================================================
--- content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc (revision 104391)
+++ content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc (working copy)
@@ -42,9 +42,7 @@
: initialize_failed_(false),
context_(NULL),
gl_(NULL),
-#ifndef WTF_USE_THREADED_COMPOSITING
web_view_(NULL),
-#endif
#if defined(OS_MACOSX)
plugin_handle_(NULL),
#endif // defined(OS_MACOSX)
@@ -102,9 +100,7 @@
if (!render_view)
return false;
render_view_routing_id_ = render_view->routing_id();
-#ifndef WTF_USE_THREADED_COMPOSITING
web_view_ = web_view;
-#endif
}
return true;
}
@@ -244,12 +240,10 @@
void WebGraphicsContext3DCommandBufferImpl::prepareTexture() {
// Copies the contents of the off-screen render target into the texture
// used by the compositor.
-#ifndef WTF_USE_THREADED_COMPOSITING
RenderView* renderview =
web_view_ ? RenderView::FromWebView(web_view_) : NULL;
if (renderview)
renderview->OnViewContextSwapBuffersPosted();
-#endif
context_->SwapBuffers();
context_->Echo(method_factory_.NewRunnableMethod(
&WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete));
@@ -1027,13 +1021,12 @@
}
void WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete() {
-#ifndef WTF_USE_THREADED_COMPOSITING
// This may be called after tear-down of the RenderView.
RenderView* renderview =
web_view_ ? RenderView::FromWebView(web_view_) : NULL;
if (renderview)
renderview->OnViewContextSwapBuffersComplete();
-#endif
+
if (swapbuffers_complete_callback_)
swapbuffers_complete_callback_->onSwapBuffersComplete();
}
@@ -1088,12 +1081,10 @@
if (context_lost_callback_) {
context_lost_callback_->onContextLost();
}
-#ifndef WTF_USE_THREADED_COMPOSITING
RenderView* renderview =
web_view_ ? RenderView::FromWebView(web_view_) : NULL;
if (renderview)
renderview->OnViewContextSwapBuffersAborted();
-#endif
}
#endif // defined(ENABLE_GPU)
« no previous file with comments | « no previous file | content/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698