summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_context.h
diff options
context:
space:
mode:
authorepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-20 00:54:24 +0000
committerepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-20 00:54:24 +0000
commit85cb468fe17f6449a387e11795b200a815c720f2 (patch)
treed6a14c298ee2940fe39fe8bee4291b0f26ad413d /ui/gl/gl_context.h
parent4e2876a49c504657cc0cc77fe590ea6dc0238346 (diff)
downloadchromium_src-85cb468fe17f6449a387e11795b200a815c720f2.zip
chromium_src-85cb468fe17f6449a387e11795b200a815c720f2.tar.gz
chromium_src-85cb468fe17f6449a387e11795b200a815c720f2.tar.bz2
Reland "gpu: Fix Vivante's "hisilicon" GPUs"
This fixes "Hisilicon" GPUs, which is an instance of a Vivante's GPU design. This involves enabling virtual contexts, since they don't support share-groups, and further adds a work-around for switching surfaces. Without the work- around the view surface "inherits" the size of the last bound surface (which for Chrome tends to be a 1x1 pbuffer) resulting in a black screen. The following steps "repair" the view surface every time it is made current: - Make it current. - Bind the default frame-buffer. - Make it not current. - Destroy/recreate it from the native handle. - Make it current again. NOTE: The "Recreate" function is added to surface because the Destroy/Initialize may be intercepted or modified by wrapper surface classes. Recreate is similar to resize, which after being forwarded by a wrapper can call Destroy/Initialize on the 'real' surface. BUG=179250 NOTRY=true No-try, as all the relevant bots are already green. Review URL: https://chromiumcodereview.appspot.com/13852023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195349 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl/gl_context.h')
-rw-r--r--ui/gl/gl_context.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gl/gl_context.h b/ui/gl/gl_context.h
index 7300cdb..7645a29 100644
--- a/ui/gl/gl_context.h
+++ b/ui/gl/gl_context.h
@@ -65,6 +65,10 @@ class GL_EXPORT GLContext : public base::RefCounted<GLContext> {
// transitioning can cause corruption and hangs (OS X only).
virtual void SetSafeToForceGpuSwitch();
+ // Indicate that the real context switches should recreate the surface
+ // (For an Android work-around only).
+ virtual void SetRecreateSurfaceOnMakeCurrent();
+
// Returns whether the current context supports the named extension. The
// context must be current.
bool HasExtension(const char* name);