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

Unified Diff: ppapi/proxy/ppb_graphics_3d_proxy.cc

Issue 12581004: Move InsertSyncPoint to GLES2Interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 7 years, 9 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 | « ppapi/proxy/ppb_graphics_3d_proxy.h ('k') | ppapi/thunk/ppb_graphics_3d_api.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_graphics_3d_proxy.cc
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc
index a6f67459edddad1c85b11754770e81abd28d43d3..11db5a160365f4945d6a2e83d57620b8b0ebfafc 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -175,6 +175,10 @@ class Graphics3D::LockingCommandBuffer : public gpu::CommandBuffer {
MaybeLock lock(need_to_lock_);
gpu_command_buffer_->SetContextLostReason(reason);
}
+ virtual uint32 InsertSyncPoint() OVERRIDE {
+ MaybeLock lock(need_to_lock_);
+ return gpu_command_buffer_->InsertSyncPoint();
+ }
// Weak pointer - see class Graphics3D for the scopted_ptr.
gpu::CommandBuffer* gpu_command_buffer_;
@@ -248,6 +252,11 @@ PP_Graphics3DTrustedState Graphics3D::FlushSyncFast(int32_t put_offset,
return GetErrorState();
}
+uint32_t Graphics3D::InsertSyncPoint() {
+ NOTREACHED();
+ return 0;
+}
+
gpu::CommandBuffer* Graphics3D::GetCommandBuffer() {
return locking_command_buffer_.get();
}
@@ -360,6 +369,8 @@ bool PPB_Graphics3D_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnMsgGetTransferBuffer)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
OnMsgSwapBuffers)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_InsertSyncPoint,
+ OnMsgInsertSyncPoint)
#endif // !defined(OS_NACL)
IPC_MESSAGE_HANDLER(PpapiMsg_PPBGraphics3D_SwapBuffersACK,
@@ -489,6 +500,14 @@ void PPB_Graphics3D_Proxy::OnMsgSwapBuffers(const HostResource& context) {
if (enter.succeeded())
enter.SetResult(enter.object()->SwapBuffers(enter.callback()));
}
+
+void PPB_Graphics3D_Proxy::OnMsgInsertSyncPoint(const HostResource& context,
+ uint32* sync_point) {
+ *sync_point = 0;
+ EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
+ if (enter.succeeded())
+ *sync_point = enter.object()->InsertSyncPoint();
+}
#endif // !defined(OS_NACL)
void PPB_Graphics3D_Proxy::OnMsgSwapBuffersACK(const HostResource& resource,
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.h ('k') | ppapi/thunk/ppb_graphics_3d_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698