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

Unified Diff: content/common/gpu/gpu_command_buffer_stub.cc

Issue 9380037: Use shared memory to update the renderer's view of the command buffer state. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix hang when last_state_.error accidentally overwritten Created 8 years, 10 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/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index ed36682c9cc0fe2ffacb2bb17a376696b2663d7c..4bfac3be4f62320e9b537f49ff6d3a32bbf96354 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -98,6 +98,8 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
OnInitialize);
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_SetGetBuffer,
OnSetGetBuffer);
+ IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_SetSharedStateBuffer,
+ OnSetSharedStateBuffer);
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_SetParent,
OnSetParent);
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetState, OnGetState);
@@ -294,6 +296,17 @@ void GpuCommandBufferStub::OnSetGetBuffer(
Send(reply_message);
}
+void GpuCommandBufferStub::OnSetSharedStateBuffer(
+ int32 shm_id, IPC::Message* reply_message) {
+ if (command_buffer_.get()) {
+ command_buffer_->SetSharedStateBuffer(shm_id);
+ } else {
+ DLOG(ERROR) << "no command_buffer.";
+ reply_message->set_reply_error();
+ }
+ Send(reply_message);
+}
+
void GpuCommandBufferStub::OnSetParent(int32 parent_route_id,
uint32 parent_texture_id,
IPC::Message* reply_message) {
@@ -476,9 +489,7 @@ void GpuCommandBufferStub::ReportState() {
gfx::GLContext::LosesAllContextsOnContextLost()) {
channel_->LoseAllContexts();
} else {
- IPC::Message* msg = new GpuCommandBufferMsg_UpdateState(route_id_, state);
- msg->set_unblock(true);
- Send(msg);
+ command_buffer_->UpdateState();
}
}
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698