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

Unified Diff: content/renderer/pepper/ppb_graphics_3d_impl.cc

Issue 215803002: Remove CommandBuffer::GetTransferBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 | « content/renderer/pepper/ppb_graphics_3d_impl.h ('k') | gpu/command_buffer/client/client_test_helper.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 1ba14bc3a8cd480d3eff2a2bfaeaaf2a34a46174..3ad09d4eee47c9462d90f3def0fbf6beee360f35 100644
--- a/content/renderer/pepper/ppb_graphics_3d_impl.cc
+++ b/content/renderer/pepper/ppb_graphics_3d_impl.cc
@@ -38,22 +38,6 @@ namespace {
const int32 kCommandBufferSize = 1024 * 1024;
const int32 kTransferBufferSize = 1024 * 1024;
-PP_Bool BufferToHandle(scoped_refptr<gpu::Buffer> buffer,
- int* shm_handle,
- uint32_t* shm_size) {
- if (!buffer || !shm_handle || !shm_size)
- return PP_FALSE;
-#if defined(OS_POSIX)
- *shm_handle = buffer->shared_memory()->handle().fd;
-#elif defined(OS_WIN)
- *shm_handle = reinterpret_cast<int>(buffer->shared_memory()->handle());
-#else
- #error "Platform not supported."
-#endif
- *shm_size = buffer->size();
- return PP_TRUE;
-}
-
} // namespace.
PPB_Graphics3D_Impl::PPB_Graphics3D_Impl(PP_Instance instance)
@@ -112,10 +96,10 @@ gpu::CommandBuffer::State PPB_Graphics3D_Impl::GetState() {
return GetCommandBuffer()->GetState();
}
-int32_t PPB_Graphics3D_Impl::CreateTransferBuffer(uint32_t size) {
- int32_t id = -1;
- GetCommandBuffer()->CreateTransferBuffer(size, &id);
- return id;
+scoped_refptr<gpu::Buffer> PPB_Graphics3D_Impl::CreateTransferBuffer(
+ uint32_t size,
+ int32_t* id) {
+ return GetCommandBuffer()->CreateTransferBuffer(size, id);
}
PP_Bool PPB_Graphics3D_Impl::DestroyTransferBuffer(int32_t id) {
@@ -123,13 +107,6 @@ PP_Bool PPB_Graphics3D_Impl::DestroyTransferBuffer(int32_t id) {
return PP_TRUE;
}
-PP_Bool PPB_Graphics3D_Impl::GetTransferBuffer(int32_t id,
- int* shm_handle,
- uint32_t* shm_size) {
- scoped_refptr<gpu::Buffer> buffer = GetCommandBuffer()->GetTransferBuffer(id);
- return BufferToHandle(buffer, shm_handle, shm_size);
-}
-
PP_Bool PPB_Graphics3D_Impl::Flush(int32_t put_offset) {
GetCommandBuffer()->Flush(put_offset);
return PP_TRUE;
« no previous file with comments | « content/renderer/pepper/ppb_graphics_3d_impl.h ('k') | gpu/command_buffer/client/client_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698