Revert "Disallow caching of non-ninepatchable blur mask filtered round rects"
This reverts commit baa74dc154
.
Reason for revert: big perf regression on Mali400 and Tegra3 - we will try making the key more cache-friendly
Original change's description:
> Disallow caching of non-ninepatchable blur mask filtered round rects
>
> From our simulation of the Camera App's behavior we get:
>
> w/ caching (old):
> Textures Created: 802
> Texture Uploads: 802
>
> w/o caching (new):
> Textures Created: 6
> Texture Uploads: 802
>
> Bug: b/185828492, skia:11953
> Change-Id: I7975033bf9f7d24ede6f1add23fe95cda3ba5669
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404202
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
TBR=bsalomon@google.com,robertphillips@google.com
Change-Id: If1f4065041b1a3800d35be7ba7c8c897211cc553
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: b/185828492
Bug: skia:11953
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404916
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
parent
28181e70ce
commit
abf035357f
@ -288,13 +288,9 @@ static bool compute_key_and_clip_bounds(GrUniqueKey* maskKey,
|
||||
|
||||
#ifndef SK_DISABLE_MASKFILTERED_MASK_CACHING
|
||||
// To prevent overloading the cache with entries during animations we limit the cache of masks
|
||||
// to cases where the matrix preserves axis alignment. Additionally, caching blurred masks
|
||||
// for non-nine-patchable blurred round rects can also quickly flood the cache.
|
||||
bool useCache = !inverseFilled &&
|
||||
viewMatrix.preservesAxisAlignment() &&
|
||||
shape.hasUnstyledKey() &&
|
||||
as_MFB(maskFilter)->asABlur(nullptr) &&
|
||||
!shape.asRRect(nullptr, nullptr, nullptr, nullptr);
|
||||
// to cases where the matrix preserves axis alignment.
|
||||
bool useCache = !inverseFilled && viewMatrix.preservesAxisAlignment() &&
|
||||
shape.hasUnstyledKey() && as_MFB(maskFilter)->asABlur(nullptr);
|
||||
|
||||
if (useCache) {
|
||||
SkIRect clippedMaskRect, unClippedMaskRect;
|
||||
|
Loading…
Reference in New Issue
Block a user