summaryrefslogtreecommitdiffstats
path: root/content/gpu
diff options
context:
space:
mode:
authorepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-18 00:25:04 +0000
committerepenner@chromium.org <epenner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-18 00:25:04 +0000
commitcafa295eb0c24cd3d8b5518bfe3d83544552888a (patch)
treea38ce1c2f6e6ea04335d37211571b200723bae9d /content/gpu
parent1270ea67ad7abc29d7ac452b41e14cb1656b7f5d (diff)
downloadchromium_src-cafa295eb0c24cd3d8b5518bfe3d83544552888a.zip
chromium_src-cafa295eb0c24cd3d8b5518bfe3d83544552888a.tar.gz
chromium_src-cafa295eb0c24cd3d8b5518bfe3d83544552888a.tar.bz2
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, 229643 NOTRY=true No try, since it's Android only and already tested. Review URL: https://chromiumcodereview.appspot.com/13140006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194737 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/gpu')
-rw-r--r--content/gpu/gpu_info_collector_android.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/content/gpu/gpu_info_collector_android.cc b/content/gpu/gpu_info_collector_android.cc
index 3197414..902bc8c 100644
--- a/content/gpu/gpu_info_collector_android.cc
+++ b/content/gpu/gpu_info_collector_android.cc
@@ -74,6 +74,7 @@ bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) {
bool is_arm = vendor.find("arm") != std::string::npos;
bool is_qualcomm = vendor.find("qualcomm") != std::string::npos;
bool is_mali_t604 = is_arm && renderer.find("mali-t604") != std::string::npos;
+ bool is_hisilicon = vendor.find("hisilicon") != std::string::npos;
base::android::BuildInfo* build_info =
base::android::BuildInfo::GetInstance();
@@ -91,7 +92,8 @@ bool CollectBasicGraphicsInfo(content::GPUInfo* gpu_info) {
// IMG: avoid context switching perf problems, crashes with share groups
// Mali-T604: http://crbug.com/154715
// QualComm, NVIDIA: Crashes with share groups
- if (is_img || is_mali_t604 || is_nexus7 || (is_qualcomm && sdk_int != 16)) {
+ if (is_hisilicon || is_img || is_mali_t604 || is_nexus7
+ || (is_qualcomm && sdk_int != 16)) {
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableVirtualGLContexts);
}