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

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

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
Index: gpu/command_buffer/client/gles2_implementation.h
diff --git a/gpu/command_buffer/client/gles2_implementation.h b/gpu/command_buffer/client/gles2_implementation.h
index 2b5312a62451936a33c08954d84c8e9bfdb385a9..4e5334a8ca32510ab55f9ab83ef4febd577bf97d 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -108,6 +108,12 @@ class IdHandlerInterface {
// shared memory and synchronization issues.
class GLES2_IMPL_EXPORT GLES2Implementation {
public:
+ class ErrorMessageCallback {
+ public:
+ virtual ~ErrorMessageCallback() { }
+ virtual void OnErrorMessage(const char* msg, int id) = 0;
+ };
+
// Stores client side cached GL state.
struct GLState {
GLState()
@@ -215,6 +221,10 @@ class GLES2_IMPL_EXPORT GLES2Implementation {
void FreeUnusedSharedMemory();
void FreeEverything();
+ void SetErrorMessageCallback(ErrorMessageCallback* callback) {
+ error_message_callback_ = callback;
+ }
+
private:
friend class ClientSideBufferHelper;
friend class GLES2ImplementationTest;
@@ -522,6 +532,8 @@ class GLES2_IMPL_EXPORT GLES2Implementation {
scoped_ptr<QueryTracker> query_tracker_;
QueryTracker::Query* current_query_;
+ ErrorMessageCallback* error_message_callback_;
+
DISALLOW_COPY_AND_ASSIGN(GLES2Implementation);
};

Powered by Google App Engine
This is Rietveld 408576698