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

Unified Diff: ppapi/proxy/ppb_graphics_3d_proxy.cc

Issue 1345813002: Added a unique command buffer ID for command buffers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bad merge Created 5 years, 3 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/proxy/resource_creation_proxy.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 8a8c6b7f4d3746f43b06befe10448fd26983e7e4..81b6a70c927ddbb63cd63ce8eff4f66225185659 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -56,13 +56,15 @@ Graphics3D::~Graphics3D() {
bool Graphics3D::Init(gpu::gles2::GLES2Implementation* share_gles2,
const gpu::Capabilities& capabilities,
- const SerializedHandle& shared_state) {
+ const SerializedHandle& shared_state,
+ uint64_t command_buffer_id) {
PluginDispatcher* dispatcher = PluginDispatcher::GetForResource(this);
if (!dispatcher)
return false;
command_buffer_.reset(new PpapiCommandBufferProxy(
- host_resource(), dispatcher, capabilities, shared_state));
+ host_resource(), dispatcher, capabilities, shared_state,
+ command_buffer_id));
return CreateGLES2Impl(kCommandBufferSize, kTransferBufferSize,
share_gles2);
@@ -173,15 +175,19 @@ PP_Resource PPB_Graphics3D_Proxy::CreateProxyResource(
HostResource result;
gpu::Capabilities capabilities;
ppapi::proxy::SerializedHandle shared_state;
+ uint64_t command_buffer_id = 0;
dispatcher->Send(new PpapiHostMsg_PPBGraphics3D_Create(API_ID_PPB_GRAPHICS_3D,
- instance, share_host, attribs, &result, &capabilities, &shared_state));
+ instance, share_host, attribs, &result, &capabilities, &shared_state,
+ &command_buffer_id));
if (result.is_null())
return 0;
scoped_refptr<Graphics3D> graphics_3d(new Graphics3D(result));
- if (!graphics_3d->Init(share_gles2, capabilities, shared_state))
+ if (!graphics_3d->Init(share_gles2, capabilities, shared_state,
+ command_buffer_id)) {
return 0;
+ }
return graphics_3d->GetReference();
}
@@ -222,12 +228,14 @@ bool PPB_Graphics3D_Proxy::OnMessageReceived(const IPC::Message& msg) {
}
#if !defined(OS_NACL)
-void PPB_Graphics3D_Proxy::OnMsgCreate(PP_Instance instance,
- HostResource share_context,
- const std::vector<int32_t>& attribs,
- HostResource* result,
- gpu::Capabilities* capabilities,
- SerializedHandle* shared_state) {
+void PPB_Graphics3D_Proxy::OnMsgCreate(
+ PP_Instance instance,
+ HostResource share_context,
+ const std::vector<int32_t>& attribs,
+ HostResource* result,
+ gpu::Capabilities* capabilities,
+ SerializedHandle* shared_state,
+ uint64* command_buffer_id) {
shared_state->set_null_shmem();
if (attribs.empty() ||
attribs.back() != PP_GRAPHICS3DATTRIB_NONE ||
@@ -246,7 +254,8 @@ void PPB_Graphics3D_Proxy::OnMsgCreate(PP_Instance instance,
share_context.host_resource(),
&attribs.front(),
capabilities,
- &handle));
+ &handle,
+ command_buffer_id));
if (!result->is_null()) {
shared_state->set_shmem(TransportSHMHandle(dispatcher(), handle),
sizeof(gpu::CommandBuffer::State));
« no previous file with comments | « ppapi/proxy/ppb_graphics_3d_proxy.h ('k') | ppapi/proxy/resource_creation_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698