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

Unified Diff: webkit/plugins/ppapi/ppb_context_3d_impl.cc

Issue 8566059: Add CommandBuffer::SetGetBuffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: etc Created 9 years, 1 month 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
Index: webkit/plugins/ppapi/ppb_context_3d_impl.cc
diff --git a/webkit/plugins/ppapi/ppb_context_3d_impl.cc b/webkit/plugins/ppapi/ppb_context_3d_impl.cc
index 5acf56cafb149ade03eac33c2dbda1201780c26f..f59da2c43fb2e75ea736878f6ada3b33bda0a5f1 100644
--- a/webkit/plugins/ppapi/ppb_context_3d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_context_3d_impl.cc
@@ -167,18 +167,17 @@ int32_t PPB_Context3D_Impl::GetBoundSurfaces(PP_Resource* draw,
return 0;
}
-PP_Bool PPB_Context3D_Impl::InitializeTrusted(int32_t size) {
+PP_Bool PPB_Context3D_Impl::InitializeTrusted() {
if (!platform_context_.get())
return PP_FALSE;
- return PP_FromBool(platform_context_->GetCommandBuffer()->Initialize(size));
+ return PP_FromBool(platform_context_->GetCommandBuffer()->Initialize());
}
-PP_Bool PPB_Context3D_Impl::GetRingBuffer(int* shm_handle,
- uint32_t* shm_size) {
+PP_Bool PPB_Context3D_Impl::SetGetBuffer(int32_t shm_id) {
if (!platform_context_.get())
return PP_FALSE;
- gpu::Buffer buffer = platform_context_->GetCommandBuffer()->GetRingBuffer();
- return ShmToHandle(buffer.shared_memory, buffer.size, shm_handle, shm_size);
+ platform_context_->GetCommandBuffer()->SetGetBuffer(shm_id);
+ return PP_TRUE;
}
PP_Context3DTrustedState PPB_Context3D_Impl::GetState() {
@@ -314,7 +313,7 @@ bool PPB_Context3D_Impl::CreateImplementation() {
gpu::CommandBuffer* command_buffer = platform_context_->GetCommandBuffer();
DCHECK(command_buffer);
- if (!command_buffer->Initialize(kCommandBufferSize))
+ if (!command_buffer->Initialize())
return false;
// Create the GLES2 helper, which writes the command buffer protocol.

Powered by Google App Engine
This is Rietveld 408576698