OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file contains the ErrorState class. | 5 // This file contains the ErrorState class. |
6 | 6 |
7 #ifndef GPU_COMMAND_BUFFER_SERVICE_ERROR_STATE_H_ | 7 #ifndef GPU_COMMAND_BUFFER_SERVICE_ERROR_STATE_H_ |
8 #define GPU_COMMAND_BUFFER_SERVICE_ERROR_STATE_H_ | 8 #define GPU_COMMAND_BUFFER_SERVICE_ERROR_STATE_H_ |
9 | 9 |
| 10 #include <stdint.h> |
| 11 |
10 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
11 #include "gpu/command_buffer/common/types.h" | 13 #include "base/macros.h" |
12 #include "gpu/gpu_export.h" | 14 #include "gpu/gpu_export.h" |
13 | 15 |
14 namespace gpu { | 16 namespace gpu { |
15 namespace gles2 { | 17 namespace gles2 { |
16 | 18 |
17 class Logger; | 19 class Logger; |
18 | 20 |
19 // Use these macro to synthesize GL errors instead of calling the error_state | 21 // Use these macro to synthesize GL errors instead of calling the error_state |
20 // functions directly as they will propogate the __FILE__ and __LINE__. | 22 // functions directly as they will propogate the __FILE__ and __LINE__. |
21 | 23 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // GL_OUT_OF_MEMORY can cause side effects such as losing the context. | 62 // GL_OUT_OF_MEMORY can cause side effects such as losing the context. |
61 virtual void OnOutOfMemoryError() = 0; | 63 virtual void OnOutOfMemoryError() = 0; |
62 }; | 64 }; |
63 | 65 |
64 class GPU_EXPORT ErrorState { | 66 class GPU_EXPORT ErrorState { |
65 public: | 67 public: |
66 virtual ~ErrorState(); | 68 virtual ~ErrorState(); |
67 | 69 |
68 static ErrorState* Create(ErrorStateClient* client, Logger* logger); | 70 static ErrorState* Create(ErrorStateClient* client, Logger* logger); |
69 | 71 |
70 virtual uint32 GetGLError() = 0; | 72 virtual uint32_t GetGLError() = 0; |
71 | 73 |
72 virtual void SetGLError( | 74 virtual void SetGLError( |
73 const char* filename, | 75 const char* filename, |
74 int line, | 76 int line, |
75 unsigned int error, | 77 unsigned int error, |
76 const char* function_name, | 78 const char* function_name, |
77 const char* msg) = 0; | 79 const char* msg) = 0; |
78 virtual void SetGLErrorInvalidEnum( | 80 virtual void SetGLErrorInvalidEnum( |
79 const char* filename, | 81 const char* filename, |
80 int line, | 82 int line, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 ErrorState(); | 119 ErrorState(); |
118 | 120 |
119 DISALLOW_COPY_AND_ASSIGN(ErrorState); | 121 DISALLOW_COPY_AND_ASSIGN(ErrorState); |
120 }; | 122 }; |
121 | 123 |
122 } // namespace gles2 | 124 } // namespace gles2 |
123 } // namespace gpu | 125 } // namespace gpu |
124 | 126 |
125 #endif // GPU_COMMAND_BUFFER_SERVICE_ERROR_STATE_H_ | 127 #endif // GPU_COMMAND_BUFFER_SERVICE_ERROR_STATE_H_ |
126 | 128 |
OLD | NEW |