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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc

Issue 8678028: Ensure swap is performed before informing compositor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc
index 8b71506ad0b4d4aef2a26069d6576fd465ec1d2b..14e3f1538e3bd071a42a756af486d884ba3f73c0 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc
@@ -238,11 +238,11 @@ bool PluginGraphics3D::InitFromBrowserResource(PP_Resource res) {
int32_t PluginGraphics3D::SwapBuffers(PP_Resource graphics3d_id,
struct PP_CompletionCallback callback) {
-
int32_t callback_id = CompletionCallbackTable::Get()->AddCallback(callback);
if (callback_id == 0) // Just like Chrome, for now disallow blocking calls.
return PP_ERROR_BLOCKS_MAIN_THREAD;
+ impl()->SwapBuffers();
nfullagar 2011/11/23 22:51:18 what's going to happen if the NaClSrpcError retval
int32_t pp_error;
NaClSrpcError retval =
PpbGraphics3DRpcClient::PPB_Graphics3D_SwapBuffers(
@@ -256,7 +256,6 @@ int32_t PluginGraphics3D::SwapBuffers(PP_Resource graphics3d_id,
if ((PP_OK_COMPLETIONPENDING != pp_error) && (PP_OK != pp_error))
return pp_error;
- impl()->SwapBuffers();
return PP_OK_COMPLETIONPENDING;
}
« no previous file with comments | « no previous file | ppapi/proxy/ppb_graphics_3d_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698