diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-02 04:16:29 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-02 04:16:29 +0000 |
commit | 39aa139b52a9baf917f7b3f9f1ee647853aa4602 (patch) | |
tree | 8eca0f46bd878bd8e33a65e83b6c3e727688fee2 /ppapi | |
parent | 6f41ac2a6d15c24e8d97eeb9be8c44330b5d5dfb (diff) | |
download | chromium_src-39aa139b52a9baf917f7b3f9f1ee647853aa4602.zip chromium_src-39aa139b52a9baf917f7b3f9f1ee647853aa4602.tar.gz chromium_src-39aa139b52a9baf917f7b3f9f1ee647853aa4602.tar.bz2 |
gpu: Lose context when BeginQueryEXT fails to allocate.
Instead of crashes, raise a GL_OUT_OF_MEMORY error. Since compositor
does not want to deal with these errors and it would leave it in a
bad state, add the ability to lose the context when GL_OUT_OF_MEMORY
occurs.
R=piman
BUG=351587
Review URL: https://codereview.chromium.org/199443004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/shared_impl/ppb_graphics_3d_shared.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ppapi/shared_impl/ppb_graphics_3d_shared.cc b/ppapi/shared_impl/ppb_graphics_3d_shared.cc index b4e258b..1b3677b1 100644 --- a/ppapi/shared_impl/ppb_graphics_3d_shared.cc +++ b/ppapi/shared_impl/ppb_graphics_3d_shared.cc @@ -118,6 +118,7 @@ bool PPB_Graphics3D_Shared::CreateGLES2Impl( transfer_buffer_.reset(new gpu::TransferBuffer(gles2_helper_.get())); const bool bind_creates_resources = true; + const bool lose_context_when_out_of_memory = false; // Create the object exposing the OpenGL API. gles2_impl_.reset(new gpu::gles2::GLES2Implementation( @@ -125,6 +126,7 @@ bool PPB_Graphics3D_Shared::CreateGLES2Impl( share_gles2 ? share_gles2->share_group() : NULL, transfer_buffer_.get(), bind_creates_resources, + lose_context_when_out_of_memory, GetGpuControl())); if (!gles2_impl_->Initialize( |