Limit clear as draw workaround to Adreno 3xx.

This causes more problems than it fixes on the Nexus 6.

Review URL: https://codereview.chromium.org/917313005
This commit is contained in:
bsalomon 2015-02-13 09:00:39 -08:00 committed by Commit bot
parent e36914cb20
commit a8fcea0cd0
3 changed files with 15 additions and 1 deletions

View File

@ -403,7 +403,7 @@ bool GrGLCaps::init(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli) {
if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() || if (kPowerVR54x_GrGLRenderer == ctxInfo.renderer() ||
kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() || kPowerVRRogue_GrGLRenderer == ctxInfo.renderer() ||
kQualcomm_GrGLVendor == ctxInfo.vendor()) { kAdreno3xx_GrGLRenderer == ctxInfo.renderer()) {
fUseDrawInsteadOfClear = true; fUseDrawInsteadOfClear = true;
} }

View File

@ -214,6 +214,18 @@ GrGLRenderer GrGLGetRendererFromString(const char* rendererString) {
SK_ARRAY_COUNT(kPowerVRRogueStr)-1)) { SK_ARRAY_COUNT(kPowerVRRogueStr)-1)) {
return kPowerVRRogue_GrGLRenderer; return kPowerVRRogue_GrGLRenderer;
} }
int adrenoNumber;
n = sscanf(rendererString, "Adreno (TM) %d", &adrenoNumber);
if (1 == n) {
if (adrenoNumber >= 300) {
if (adrenoNumber < 400) {
return kAdreno3xx_GrGLRenderer;
}
if (adrenoNumber < 500) {
return kAdreno4xx_GrGLRenderer;
}
}
}
} }
return kOther_GrGLRenderer; return kOther_GrGLRenderer;
} }

View File

@ -45,6 +45,8 @@ enum GrGLRenderer {
kTegra3_GrGLRenderer, kTegra3_GrGLRenderer,
kPowerVR54x_GrGLRenderer, kPowerVR54x_GrGLRenderer,
kPowerVRRogue_GrGLRenderer, kPowerVRRogue_GrGLRenderer,
kAdreno3xx_GrGLRenderer,
kAdreno4xx_GrGLRenderer,
kOther_GrGLRenderer kOther_GrGLRenderer
}; };