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

Unified Diff: content/renderer/pepper/ppb_graphics_3d_impl.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 | « content/renderer/pepper/ppb_graphics_3d_impl.h ('k') | content/renderer/pepper/resource_creation_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/ppb_graphics_3d_impl.cc
diff --git a/content/renderer/pepper/ppb_graphics_3d_impl.cc b/content/renderer/pepper/ppb_graphics_3d_impl.cc
index 2f715b46a5309a1a76a90c9ae48241bb7eb81b3d..33087c0737485a983fce9234eefe5927c5230415 100644
--- a/content/renderer/pepper/ppb_graphics_3d_impl.cc
+++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc
@@ -80,7 +80,8 @@ PP_Resource PPB_Graphics3D_Impl::CreateRaw(
PP_Resource share_context,
const int32_t* attrib_list,
gpu::Capabilities* capabilities,
- base::SharedMemoryHandle* shared_state_handle) {
+ base::SharedMemoryHandle* shared_state_handle,
+ uint64_t* command_buffer_id) {
PPB_Graphics3D_API* share_api = NULL;
if (share_context) {
EnterResourceNoLock<PPB_Graphics3D_API> enter(share_context, true);
@@ -91,7 +92,7 @@ PP_Resource PPB_Graphics3D_Impl::CreateRaw(
scoped_refptr<PPB_Graphics3D_Impl> graphics_3d(
new PPB_Graphics3D_Impl(instance));
if (!graphics_3d->InitRaw(share_api, attrib_list, capabilities,
- shared_state_handle))
+ shared_state_handle, command_buffer_id))
return 0;
return graphics_3d->GetReference();
}
@@ -205,7 +206,7 @@ int32 PPB_Graphics3D_Impl::DoSwapBuffers() {
bool PPB_Graphics3D_Impl::Init(PPB_Graphics3D_API* share_context,
const int32_t* attrib_list) {
- if (!InitRaw(share_context, attrib_list, NULL, NULL))
+ if (!InitRaw(share_context, attrib_list, NULL, NULL, NULL))
return false;
gpu::gles2::GLES2Implementation* share_gles2 = NULL;
@@ -221,7 +222,8 @@ bool PPB_Graphics3D_Impl::InitRaw(
PPB_Graphics3D_API* share_context,
const int32_t* attrib_list,
gpu::Capabilities* capabilities,
- base::SharedMemoryHandle* shared_state_handle) {
+ base::SharedMemoryHandle* shared_state_handle,
+ uint64_t* command_buffer_id) {
PepperPluginInstanceImpl* plugin_instance =
HostGlobals::Get()->GetInstance(pp_instance());
if (!plugin_instance)
@@ -301,6 +303,8 @@ bool PPB_Graphics3D_Impl::InitRaw(
*shared_state_handle = command_buffer_->GetSharedStateHandle();
if (capabilities)
*capabilities = command_buffer_->GetCapabilities();
+ if (command_buffer_id)
+ *command_buffer_id = command_buffer_->GetCommandBufferID();
mailbox_ = gpu::Mailbox::Generate();
if (!command_buffer_->ProduceFrontBuffer(mailbox_))
return false;
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.h ('k') | content/renderer/pepper/resource_creation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698