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

Unified Diff: ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc

Issue 8919014: Revert "Revert 113479 - Revert "Revert 113250 - Add CommandBuffer::SetGetBuffer"" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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: ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc b/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc
index e151312373e55700afcffe6be3738ef33bbbbd0f..4a83a0477dae4d8b150fbcf659844f2692a1b3b9 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc
+++ b/ppapi/native_client/src/shared/ppapi_proxy/command_buffer_nacl.cc
@@ -25,38 +25,18 @@ CommandBufferNacl::~CommandBufferNacl() {
iface_core_->ReleaseResource(graphics_3d_);
}
-bool CommandBufferNacl::Initialize(int32 size) {
+bool CommandBufferNacl::Initialize() {
DebugPrintf("CommandBufferNacl::Initialize\n");
int32_t success;
NaClSrpcChannel* channel = ppapi_proxy::GetMainSrpcChannel();
NaClSrpcError retval =
PpbGraphics3DRpcClient::PPB_Graphics3DTrusted_InitCommandBuffer(
- channel, graphics_3d_, size, &success);
+ channel, graphics_3d_, &success);
DebugPrintf("CommandBufferNaCl::Initialize returned success=%s\n",
(PP_TRUE == success) ? "TRUE" : "FALSE");
return NACL_SRPC_RESULT_OK == retval && PP_TRUE == success;
}
-gpu::Buffer CommandBufferNacl::GetRingBuffer() {
- DebugPrintf("CommandBufferNacl::GetRingBuffer\n");
- if (!buffer_.ptr) {
- DebugPrintf("CommandBufferNacl::GetRingBuffer: Fetching\n");
- int shm_handle = -1;
- int32_t shm_size = 0;
-
- NaClSrpcChannel* channel = ppapi_proxy::GetMainSrpcChannel();
- NaClSrpcError retval =
- PpbGraphics3DRpcClient::PPB_Graphics3DTrusted_GetRingBuffer(
- channel, graphics_3d_, &shm_handle, &shm_size);
- if (NACL_SRPC_RESULT_OK != retval) {
- shm_handle = -1;
- }
- buffer_ = BufferFromShm(shm_handle, shm_size);
- }
-
- return buffer_;
-}
-
gpu::CommandBuffer::State CommandBufferNacl::GetState() {
DebugPrintf("CommandBufferNacl::GetState\n");
PP_Graphics3DTrustedState state;
@@ -110,6 +90,13 @@ gpu::CommandBuffer::State CommandBufferNacl::FlushSync(int32 put_offset,
return last_state_;
}
+void CommandBufferNacl::SetGetBuffer(int32 transfer_buffer_id) {
+ DebugPrintf("CommandBufferNacl::SetGetBuffer\n");
+ NaClSrpcChannel* channel = ppapi_proxy::GetMainSrpcChannel();
+ PpbGraphics3DRpcClient::PPB_Graphics3DTrusted_SetGetBuffer(
+ channel, graphics_3d_, transfer_buffer_id);
+}
+
void CommandBufferNacl::SetGetOffset(int32 get_offset) {
DebugPrintf("CommandBufferNacl::SetGetOffset\n");
// Not implemented by proxy.

Powered by Google App Engine
This is Rietveld 408576698