diff options
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_graphics_3d.cc | 3 | ||||
-rw-r--r-- | ppapi/proxy/ppb_graphics_3d_proxy.cc | 2 |
2 files changed, 2 insertions, 3 deletions
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 8b71506..14e3f15 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(); 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; } diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc index 0bb7440..2104cd8 100644 --- a/ppapi/proxy/ppb_graphics_3d_proxy.cc +++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc @@ -382,12 +382,12 @@ gpu::CommandBuffer* Graphics3D::GetCommandBuffer() { } int32 Graphics3D::DoSwapBuffers() { + gles2_impl()->SwapBuffers(); IPC::Message* msg = new PpapiHostMsg_PPBGraphics3D_SwapBuffers( API_ID_PPB_GRAPHICS_3D, host_resource()); msg->set_unblock(true); PluginDispatcher::GetForResource(this)->Send(msg); - gles2_impl()->SwapBuffers(); return PP_OK_COMPLETIONPENDING; } |