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

Unified Diff: gpu/command_buffer/client/gles2_implementation.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
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 b120a62e1da8fe6a98f309f4ade0fc5492e47ce1..c8438027bdf21ecfbbb1b4670569adcc19e31d89 100644
--- a/gpu/command_buffer/client/gles2_implementation.h
+++ b/gpu/command_buffer/client/gles2_implementation.h
@@ -180,12 +180,12 @@ class GLES2_IMPL_EXPORT GLES2Implementation
// Number of swap buffers allowed before waiting.
static const size_t kMaxSwapBuffers = 2;
- GLES2Implementation(
- GLES2CmdHelper* helper,
- ShareGroup* share_group,
- TransferBufferInterface* transfer_buffer,
- bool bind_generates_resource,
- GpuControl* gpu_control);
+ GLES2Implementation(GLES2CmdHelper* helper,
+ ShareGroup* share_group,
+ TransferBufferInterface* transfer_buffer,
+ bool bind_generates_resource,
+ bool lose_context_when_out_of_memory,
+ GpuControl* gpu_control);
virtual ~GLES2Implementation();
@@ -592,11 +592,6 @@ class GLES2_IMPL_EXPORT GLES2Implementation
void FinishHelper();
- // Asserts that the context is lost.
- // NOTE: This is an expensive call and should only be called
- // for error checking.
- bool MustBeContextLost();
-
void RunIfContextNotLost(const base::Closure& callback);
void OnSwapBuffersComplete();
@@ -729,6 +724,9 @@ class GLES2_IMPL_EXPORT GLES2Implementation
// Whether or not to print debugging info.
bool debug_;
+ // When true, the context is lost when a GL_OUT_OF_MEMORY error occurs.
+ bool lose_context_when_out_of_memory_;
+
// Used to check for single threaded access.
int use_count_;
« no previous file with comments | « gpu/command_buffer/client/gl_in_process_context.cc ('k') | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698