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

Unified Diff: gpu/command_buffer/service/error_state.h

Issue 199443004: gpu: Raise GL_OUT_OF_MEMORY when BeginQueryEXT fails to allocate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: checkmem: benchmark Created 6 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/service/context_state.cc ('k') | gpu/command_buffer/service/error_state.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/error_state.h
diff --git a/gpu/command_buffer/service/error_state.h b/gpu/command_buffer/service/error_state.h
index c4ef691925897c95d46758e30119734b1a9e7e20..0e6a4b067a146d5b7c0749df46c470098f58dff4 100644
--- a/gpu/command_buffer/service/error_state.h
+++ b/gpu/command_buffer/service/error_state.h
@@ -55,12 +55,17 @@ class Logger;
#define ERRORSTATE_CLEAR_REAL_GL_ERRORS(error_state, function_name) \
error_state->ClearRealGLErrors(__FILE__, __LINE__, function_name)
+class GPU_EXPORT ErrorStateClient {
+ public:
+ // GL_OUT_OF_MEMORY can cause side effects such as losing the context.
+ virtual void OnOutOfMemoryError() = 0;
+};
class GPU_EXPORT ErrorState {
public:
virtual ~ErrorState();
- static ErrorState* Create(Logger* logger);
+ static ErrorState* Create(ErrorStateClient* client, Logger* logger);
virtual uint32 GetGLError() = 0;
« no previous file with comments | « gpu/command_buffer/service/context_state.cc ('k') | gpu/command_buffer/service/error_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698