Index: gpu/command_buffer/service/gles2_cmd_decoder.h |
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.h b/gpu/command_buffer/service/gles2_cmd_decoder.h |
index 74602ffb59131acf10e94bfe2729ceb191d6dcbf..818ace92ce74739374afb89a196564fbc5026af8 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.h |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.h |
@@ -14,41 +14,10 @@ |
#include "base/time.h" |
#include "build/build_config.h" |
#include "gpu/command_buffer/service/common_decoder.h" |
+#include "gpu/command_buffer/service/logger.h" |
#include "ui/gfx/size.h" |
#include "ui/gl/gl_context.h" |
-// Use these macro to synthesize GL errors instead of calling the decoder |
-// functions directly as they will propogate the __FILE__ and __LINE__ |
- |
-// Use to synthesize a GL error on the decoder. |
-#define GLESDECODER_SET_GL_ERROR(decoder, error, function_name, msg) \ |
- decoder->SetGLError(__FILE__, __LINE__, error, function_name, msg) |
- |
-// Use to synthesize an INVALID_ENUM GL error on the decoder. Will attempt to |
-// expand the enum to a string. |
-#define GLESDECODER_SET_GL_ERROR_INVALID_ENUM( \ |
- decoder, function_name, value, label) \ |
- decoder->SetGLErrorInvalidEnum( \ |
- __FILE__, __LINE__, function_name, value, label) |
- |
-// Use to synthesize a GL error on the decoder for an invalid enum based |
-// parameter. Will attempt to expand the parameter to a string. |
-#define GLESDECODER_SET_GL_ERROR_INVALID_PARAM( \ |
- decoder, error, function_name, pname, param) \ |
- decoder->SetGLErrorInvalidParam( \ |
- __FILE__, __LINE__, error, function_name, pname, param) |
- |
-// Use to move all pending error to the wrapper so on your next GL call |
-// you can see if that call generates an error. |
-#define GLESDECODER_COPY_REAL_GL_ERRORS_TO_WRAPPER(decoder, function_name) \ |
- decoder->CopyRealGLErrorsToWrapper(__FILE__, __LINE__, function_name) |
-// Use to look at the real GL error and still pass it on to the user. |
-#define GLESDECODER_PEEK_GL_ERROR(decoder, function_name) \ |
- decoder->PeekGLError(__FILE__, __LINE__, function_name) |
-// Use to clear all current GL errors. FAILS if there are any. |
-#define GLESDECODER_CLEAR_REAL_GL_ERRORS(decoder, function_name) \ |
- decoder->ClearRealGLErrors(__FILE__, __LINE__, function_name) |
- |
namespace gfx { |
class GLContext; |
class GLSurface; |
@@ -62,6 +31,7 @@ class StreamTextureManager; |
namespace gles2 { |
class ContextGroup; |
+class ErrorState; |
class GLES2Util; |
class Logger; |
class QueryManager; |
@@ -232,46 +202,7 @@ class GPU_EXPORT GLES2Decoder : public base::SupportsWeakPtr<GLES2Decoder>, |
int height, |
bool is_texture_immutable) = 0; |
- // Gets the GL error for this context. |
- virtual uint32 GetGLError() = 0; |
- |
- // Sets a GL error. |
- virtual void SetGLError( |
- const char* filename, |
- int line, |
- unsigned error, |
- const char* function_name, |
- const char* msg) = 0; |
- virtual void SetGLErrorInvalidEnum( |
- const char* filename, |
- int line, |
- const char* function_name, |
- unsigned value, |
- const char* label) = 0; |
- virtual void SetGLErrorInvalidParam( |
- const char* filename, |
- int line, |
- unsigned error, |
- const char* function_name, |
- unsigned pname, |
- int param) = 0; |
- |
- // Copies the real GL errors to the wrapper. This is so we can |
- // make sure there are no native GL errors before calling some GL function |
- // so that on return we know any error generated was for that specific |
- // command. |
- virtual void CopyRealGLErrorsToWrapper( |
- const char* file, int line, const char* filename) = 0; |
- |
- // Gets the GLError and stores it in our wrapper. Effectively |
- // this lets us peek at the error without losing it. |
- virtual unsigned PeekGLError( |
- const char* file, int line, const char* filename) = 0; |
- |
- // Clear all real GL errors. This is to prevent the client from seeing any |
- // errors caused by GL calls that it was not responsible for issuing. |
- virtual void ClearRealGLErrors( |
- const char* file, int line, const char* filename) = 0; |
+ virtual ErrorState* GetErrorState() = 0; |
// A callback for messages from the decoder. |
virtual void SetShaderCacheCallback(const ShaderCacheCallback& callback) = 0; |