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

Unified Diff: ppapi/proxy/ppb_graphics_3d_proxy.cc

Issue 1965253002: [Reland 2] Pepper takes ownership of a mailbox before passing it to the texture layer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 7 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 ccb784b77f527bf233171f70a0ed4ea611e36dec..0c21e377733751873561ff42642fd1df3a818fba 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -105,6 +105,10 @@ void Graphics3D::EnsureWorkVisible() {
NOTREACHED();
}
+void Graphics3D::TakeFrontBuffer() {
+ NOTREACHED();
+}
+
gpu::CommandBuffer* Graphics3D::GetCommandBuffer() {
return command_buffer_.get();
}
@@ -119,6 +123,11 @@ int32_t Graphics3D::DoSwapBuffers(const gpu::SyncToken& sync_token) {
gpu::gles2::GLES2Implementation* gl = gles2_impl();
gl->SwapBuffers();
+
+ PluginDispatcher::GetForResource(this)->Send(
+ new PpapiHostMsg_PPBGraphics3D_TakeFrontBuffer(API_ID_PPB_GRAPHICS_3D,
+ host_resource()));
+
const GLuint64 fence_sync = gl->InsertFenceSyncCHROMIUM();
gl->ShallowFlushCHROMIUM();
@@ -212,6 +221,8 @@ bool PPB_Graphics3D_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnMsgDestroyTransferBuffer)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
OnMsgSwapBuffers)
+ IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_TakeFrontBuffer,
+ OnMsgTakeFrontBuffer)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_EnsureWorkVisible,
OnMsgEnsureWorkVisible)
#endif // !defined(OS_NACL)
@@ -345,6 +356,12 @@ void PPB_Graphics3D_Proxy::OnMsgSwapBuffers(const HostResource& context,
enter.object()->SwapBuffersWithSyncToken(enter.callback(), sync_token));
}
+void PPB_Graphics3D_Proxy::OnMsgTakeFrontBuffer(const HostResource& context) {
+ EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
+ if (enter.succeeded())
+ enter.object()->TakeFrontBuffer();
+}
+
void PPB_Graphics3D_Proxy::OnMsgEnsureWorkVisible(const HostResource& context) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
« 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