diff options
author | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-30 00:01:30 +0000 |
---|---|---|
committer | apatrick@chromium.org <apatrick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-30 00:01:30 +0000 |
commit | a9327cf7e1017008b2349aa99c5dac2ea2a63e87 (patch) | |
tree | e900de91c50b965b2565a311ae40e58b07803a87 /ui | |
parent | ce613ba0d5d3bc17cd55d582d4c3ad4667bee57e (diff) | |
download | chromium_src-a9327cf7e1017008b2349aa99c5dac2ea2a63e87.zip chromium_src-a9327cf7e1017008b2349aa99c5dac2ea2a63e87.tar.gz chromium_src-a9327cf7e1017008b2349aa99c5dac2ea2a63e87.tar.bz2 |
Delete GPU channel on failure to reallocate backbuffer.
This will cause a lost context and the renderer process will attempt to recover. If it does not recover, it will fall back to software compositing.
Currently SetBackbufferAllocation can only fail on Windows but we should detect failures on other platforms as well.
This might potentially fix the referenced bug.
BUG=170767
Review URL: https://chromiumcodereview.appspot.com/12090027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/gl/gl_surface.cc | 7 | ||||
-rw-r--r-- | ui/gl/gl_surface.h | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/ui/gl/gl_surface.cc b/ui/gl/gl_surface.cc index ce2cc65..27cf923 100644 --- a/ui/gl/gl_surface.cc +++ b/ui/gl/gl_surface.cc @@ -118,7 +118,8 @@ bool GLSurface::OnMakeCurrent(GLContext* context) { return true; } -void GLSurface::SetBackbufferAllocation(bool allocated) { +bool GLSurface::SetBackbufferAllocation(bool allocated) { + return true; } void GLSurface::SetFrontbufferAllocation(bool allocated) { @@ -224,8 +225,8 @@ bool GLSurfaceAdapter::OnMakeCurrent(GLContext* context) { return surface_->OnMakeCurrent(context); } -void GLSurfaceAdapter::SetBackbufferAllocation(bool allocated) { - surface_->SetBackbufferAllocation(allocated); +bool GLSurfaceAdapter::SetBackbufferAllocation(bool allocated) { + return surface_->SetBackbufferAllocation(allocated); } void GLSurfaceAdapter::SetFrontbufferAllocation(bool allocated) { diff --git a/ui/gl/gl_surface.h b/ui/gl/gl_surface.h index bb094fd..6924685 100644 --- a/ui/gl/gl_surface.h +++ b/ui/gl/gl_surface.h @@ -81,7 +81,7 @@ class GL_EXPORT GLSurface : public base::RefCounted<GLSurface> { virtual bool OnMakeCurrent(GLContext* context); // Used for explicit buffer management. - virtual void SetBackbufferAllocation(bool allocated); + virtual bool SetBackbufferAllocation(bool allocated); virtual void SetFrontbufferAllocation(bool allocated); // Get a handle used to share the surface with another process. Returns null @@ -146,7 +146,7 @@ class GL_EXPORT GLSurfaceAdapter : public GLSurface { virtual void* GetHandle() OVERRIDE; virtual unsigned int GetBackingFrameBufferObject() OVERRIDE; virtual bool OnMakeCurrent(GLContext* context) OVERRIDE; - virtual void SetBackbufferAllocation(bool allocated) OVERRIDE; + virtual bool SetBackbufferAllocation(bool allocated) OVERRIDE; virtual void SetFrontbufferAllocation(bool allocated) OVERRIDE; virtual void* GetShareHandle() OVERRIDE; virtual void* GetDisplay() OVERRIDE; |