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

Unified Diff: mojo/gles2/gles2_context.cc

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 | « mojo/examples/aura_demo/demo_context_factory.cc ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gles2/gles2_context.cc
diff --git a/mojo/gles2/gles2_context.cc b/mojo/gles2/gles2_context.cc
index 6d4106d2c082266d26a83b87c0d6d4d67140b7cf..306ffeb7c3aeb5de57b09a42e7abfdcee3f1056d 100644
--- a/mojo/gles2/gles2_context.cc
+++ b/mojo/gles2/gles2_context.cc
@@ -40,11 +40,16 @@ bool GLES2Context::Initialize() {
return false;
gles2_helper_->SetAutomaticFlushes(false);
transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get()));
+ bool bind_generates_resource = true;
+ // TODO(piman): Some contexts (such as compositor) want this to be true, so
+ // this needs to be a public parameter.
+ bool lose_context_when_out_of_memory = false;
implementation_.reset(
new gpu::gles2::GLES2Implementation(gles2_helper_.get(),
NULL,
transfer_buffer_.get(),
- true,
+ bind_generates_resource,
+ lose_context_when_out_of_memory,
&command_buffer_));
return implementation_->Initialize(kDefaultStartTransferBufferSize,
kDefaultMinTransferBufferSize,
« no previous file with comments | « mojo/examples/aura_demo/demo_context_factory.cc ('k') | ppapi/shared_impl/ppb_graphics_3d_shared.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698