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

Unified Diff: webkit/plugins/ppapi/ppb_surface_3d_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
« no previous file with comments | « webkit/plugins/ppapi/ppb_surface_3d_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppb_surface_3d_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppb_surface_3d_impl.cc (revision 98655)
+++ webkit/plugins/ppapi/ppb_surface_3d_impl.cc (working copy)
@@ -24,7 +24,8 @@
: Resource(instance),
bound_to_instance_(false),
swap_initiated_(false),
- context_(NULL) {
+ context_(NULL),
+ method_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {
}
PPB_Surface3D_Impl::~PPB_Surface3D_Impl() {
@@ -81,6 +82,8 @@
gpu::gles2::GLES2Implementation* impl = context_->gles2_impl();
if (impl)
context_->gles2_impl()->SwapBuffers();
+ context_->platform_context()->Echo(method_factory_.NewRunnableMethod(
+ &PPB_Surface3D_Impl::OnSwapBuffers));
// |SwapBuffers()| should not call us back synchronously, but double-check.
DCHECK(!swap_callback_->completed());
return PP_OK_COMPLETIONPENDING;
@@ -108,8 +111,6 @@
plugin_instance->BindGraphics(pp_instance(), 0);
// Unbind from the current context.
- if (context_ && context_->platform_context())
- context_->platform_context()->SetSwapBuffersCallback(NULL);
if (context && context->platform_context()) {
// Resize the backing texture to the size of the instance when it is bound.
// TODO(alokp): This should be the responsibility of plugins.
@@ -118,9 +119,6 @@
const gfx::Size& size = plugin_instance->position().size();
impl->ResizeCHROMIUM(size.width(), size.height());
}
-
- context->platform_context()->SetSwapBuffersCallback(
- NewCallback(this, &PPB_Surface3D_Impl::OnSwapBuffers));
}
context_ = context;
return true;
« no previous file with comments | « webkit/plugins/ppapi/ppb_surface_3d_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698