From f07064602700a99298993d5e14bec810aa2e0ae3 Mon Sep 17 00:00:00 2001 From: Jamie Nicol Date: Wed, 5 Aug 2020 18:50:12 +0000 Subject: [PATCH] Bug 1558374 - Avoid using scissored glClear() on Mali-Gxx. r=kvark,geckoview-reviewers,snorp On Mali-G71 and G72 we see artifacts when scrolling around pages, in the form of black squares or bits of content appearing in the wrong location. This appears to be due to a driver bug when calling glClear() to clear a picture cache tile texture with a scissor rect set. We encountered a similar issue on some Intel hardware in bug 1638672, and worked around it by using a custom shader to clear the texture rather than glClear. This change applies this work around to Mali-Gxx devices too. Differential Revision: https://phabricator.services.mozilla.com/D85867 --- widget/android/GfxInfo.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/widget/android/GfxInfo.cpp b/widget/android/GfxInfo.cpp index 4cf4e525a8a1..2354b952384f 100644 --- a/widget/android/GfxInfo.cpp +++ b/widget/android/GfxInfo.cpp @@ -595,8 +595,10 @@ nsresult GfxInfo::GetFeatureStatusImpl( } if (aFeature == FEATURE_WEBRENDER_SCISSORED_CACHE_CLEARS) { - const bool isMali = false; // TODO - if (isMali) { + // Mali-G71 and G72 (and presumably others) are buggy when attempting + // to clear picture cache textures with a scissor rect set. + const bool isMaliGxx = mGLStrings->Renderer().Find("Mali-G", /*ignoreCase*/ true) >= 0; + if (isMaliGxx) { *aStatus = nsIGfxInfo::FEATURE_BLOCKED_DEVICE; aFailureId = "FEATURE_FAILURE_BUG_1603515"; } else {