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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.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 | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 6c6e4e475f03b975e2009fd97af12f35f8933c82..8510f85761ecf4fc815ee8b20c3ac930bf7e3cc7 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -521,6 +521,7 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
const base::Callback<void(gfx::Size)>& callback);
virtual void SetSwapBuffersCallback(const base::Closure& callback);
+ virtual void SetMsgCallback(const MsgCallback& callback);
virtual void SetStreamTextureManager(StreamTextureManager* manager);
virtual bool GetServiceTextureId(uint32 client_texture_id,
@@ -1424,6 +1425,7 @@ class GLES2DecoderImpl : public base::SupportsWeakPtr<GLES2DecoderImpl>,
base::Callback<void(gfx::Size)> resize_callback_;
base::Closure swap_buffers_callback_;
+ MsgCallback msg_callback_;
StreamTextureManager* stream_texture_manager_;
@@ -2593,6 +2595,10 @@ void GLES2DecoderImpl::SetSwapBuffersCallback(const base::Closure& callback) {
swap_buffers_callback_ = callback;
}
+void GLES2DecoderImpl::SetMsgCallback(const MsgCallback& callback) {
+ msg_callback_ = callback;
+}
+
void GLES2DecoderImpl::SetStreamTextureManager(StreamTextureManager* manager) {
stream_texture_manager_ = manager;
}
@@ -4568,6 +4574,9 @@ void GLES2DecoderImpl::SetGLError(GLenum error, const char* msg) {
if (msg) {
last_error_ = msg;
LOG(ERROR) << last_error_;
+ if (!msg_callback_.is_null()) {
+ msg_callback_.Run(0, GLES2Util::GetStringEnum(error) + " : " + msg);
+ }
}
error_bits_ |= GLES2Util::GLErrorToErrorBit(error);
}
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698