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

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 9706042: Plumb client side synthesized GL messages to JS Console (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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 | « gpu/command_buffer/client/gles2_implementation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index c3a2c24bd9ad94a6c1afc2d8c394dafd8f7839a4..7965689aa5990af65c6d2486f5be1a024d3f155d 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -607,7 +607,8 @@ GLES2Implementation::GLES2Implementation(
sharing_resources_(share_resources),
bind_generates_resource_(bind_generates_resource),
use_count_(0),
- current_query_(NULL) {
+ current_query_(NULL),
+ error_message_callback_(NULL) {
GPU_DCHECK(helper);
GPU_DCHECK(transfer_buffer);
GPU_CLIENT_LOG_CODE_BLOCK({
@@ -829,6 +830,10 @@ void GLES2Implementation::SetGLError(GLenum error, const char* msg) {
if (msg) {
last_error_ = msg;
}
+ if (error_message_callback_) {
+ std::string temp(GLES2Util::GetStringError(error) + " : " + msg);
+ error_message_callback_->OnErrorMessage(temp.c_str(), 0);
+ }
error_bits_ |= GLES2Util::GLErrorToErrorBit(error);
}
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698