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

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

Issue 8917027: Add IPC to allow gpu process to send message for console back to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mock fix 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
« 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 8d171172df60bbcb6a278e30b024ec6b3fa7e043..4405aff3319e6bb98765d810bf6dda4377eb0377 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -249,6 +249,10 @@ void GpuCommandBufferStub::OnInitialize(
decoder_->set_debug(true);
}
+ decoder_->SetMsgCallback(
+ base::Bind(&GpuCommandBufferStub::SendConsoleMessage,
+ base::Unretained(this)));
+
SetSwapInterval();
command_buffer_->SetPutOffsetChangeCallback(
@@ -474,4 +478,16 @@ void GpuCommandBufferStub::OnSetSurfaceVisible(bool visible) {
surface_->SetVisible(visible);
}
+void GpuCommandBufferStub::SendConsoleMessage(
+ int32 id,
+ const std::string& message) {
+ GPUCommandBufferConsoleMessage console_message;
+ console_message.id = id;
+ console_message.message = message;
+ IPC::Message* msg = new GpuCommandBufferMsg_ConsoleMsg(
+ route_id_, console_message);
+ msg->set_unblock(true);
+ Send(msg);
+}
+
#endif // defined(ENABLE_GPU)
« 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