Index: mojo/services/gles2/command_buffer_impl.cc |
diff --git a/mojo/services/gles2/command_buffer_impl.cc b/mojo/services/gles2/command_buffer_impl.cc |
index 1e8a4f6e1d1132efeff343cbdd5fcb5aa32b7078..7d33b722cd8ddb24fc0fab5e4a392fa0b4698643 100644 |
--- a/mojo/services/gles2/command_buffer_impl.cc |
+++ b/mojo/services/gles2/command_buffer_impl.cc |
@@ -118,11 +118,14 @@ bool CommandBufferImpl::DoInitialize(const ShmHandle& shared_state) { |
// TODO(piman): other callbacks |
+ const size_t kSize = sizeof(gpu::CommandBufferSharedState); |
scoped_ptr<base::SharedMemory> shared_state_shm( |
new base::SharedMemory(shared_state, false)); |
- if (!command_buffer_->SetSharedStateBuffer(shared_state_shm.Pass())) |
+ if (!shared_state_shm->Map(kSize)) |
return false; |
+ command_buffer_->SetSharedStateBuffer( |
+ gpu::MakeBackingFromSharedMemory(shared_state_shm.Pass(), kSize)); |
return true; |
} |
@@ -152,7 +155,8 @@ void CommandBufferImpl::RegisterTransferBuffer(int32_t id, |
return; |
} |
- command_buffer_->RegisterTransferBuffer(id, shared_memory.Pass(), size); |
+ command_buffer_->RegisterTransferBuffer( |
+ id, gpu::MakeBackingFromSharedMemory(shared_memory.Pass(), size)); |
} |
void CommandBufferImpl::DestroyTransferBuffer(int32_t id) { |