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

Unified Diff: src/gpu/gl/GrGLUtil.cpp

Issue 701573002: Workaround for PowerVR clear issue. (Closed) Base URL: https://skia.googlesource.com/skia.git@no_null
Patch Set: Add missing spaces Created 6 years, 1 month 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 | « src/gpu/gl/GrGLUtil.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLUtil.cpp
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index 96e26c78261be5cd407502c787cc69c2fd980673..9f7b05a3c900853dc981a13289bfa52b7af30cb4 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -191,7 +191,7 @@ GrGLVendor GrGLGetVendorFromString(const char* vendorString) {
return kQualcomm_GrGLVendor;
}
if (0 == strcmp(vendorString, "NVIDIA Corporation")) {
- return kNVIDIA_GrGLVendor;
+ return kNVIDIA_GrGLVendor;
}
}
return kOther_GrGLVendor;
@@ -204,6 +204,16 @@ GrGLRenderer GrGLGetRendererFromString(const char* rendererString) {
} else if (0 == strcmp(rendererString, "NVIDIA Tegra")) {
return kTegra2_GrGLRenderer;
}
+ int lastDigit;
+ int n = sscanf(rendererString, "PowerVR SGX 54%d", &lastDigit);
+ if (1 == n && lastDigit >= 0 && lastDigit <= 9) {
+ return kPowerVR54x_GrGLRenderer;
+ }
+ static const char kPowerVRRogueStr[] = "PowerVR Rogue";
+ if (0 == strncmp(rendererString, kPowerVRRogueStr,
+ SK_ARRAY_COUNT(kPowerVRRogueStr)-1)) {
tfarina 2014/11/06 14:23:01 can strlen() be used here?
bsalomon 2014/11/06 15:00:30 It could
+ return kPowerVRRogue_GrGLRenderer;
+ }
}
return kOther_GrGLRenderer;
}
« no previous file with comments | « src/gpu/gl/GrGLUtil.h ('k') | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698