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

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

Issue 7762013: Added GPU process "echo" IPC message. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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: content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc
===================================================================
--- content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc (revision 98655)
+++ content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.cc (working copy)
@@ -49,7 +49,8 @@
swapbuffers_complete_callback_(0),
cached_width_(0),
cached_height_(0),
- bound_fbo_(0) {
+ bound_fbo_(0),
+ method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
}
WebGraphicsContext3DCommandBufferImpl::
@@ -137,11 +138,6 @@
preferred_extensions,
attribs,
active_url);
- if (context_) {
- context_->SetSwapBuffersCallback(
- NewCallback(this,
- &WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete));
- }
} else {
context_ = RendererGLContext::CreateOffscreenContext(
host,
@@ -230,6 +226,8 @@
renderview->OnViewContextSwapBuffersPosted();
#endif
context_->SwapBuffers();
+ context_->Echo(method_factory_.NewRunnableMethod(
+ &WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete));
#if defined(OS_MACOSX)
// It appears that making the compositor's on-screen context current on
// other platforms implies this flush. TODO(kbr): this means that the
« no previous file with comments | « content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h ('k') | content/renderer/pepper_platform_context_3d_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698