Chromium Code Reviews| 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; |
| } |