Refactor SkImageFilter usage to cache results.
If an SkImageFilter is used, create an image
snapshot with the filter applied to avoid
re-computing it on each draw invocation
Bug: 188450217
Test: Re-ran CTS tests
Change-Id: Ib790669e14ada9d4ebbfac958d699e2b5242f2d7
diff --git a/libs/hwui/effects/StretchEffect.h b/libs/hwui/effects/StretchEffect.h
index 64fb2bf..25777c2 100644
--- a/libs/hwui/effects/StretchEffect.h
+++ b/libs/hwui/effects/StretchEffect.h
@@ -93,8 +93,8 @@
*/
float computeStretchedPositionY(float normalizedY) const;
- sk_sp<SkShader> getShader(float width, float height,
- const sk_sp<SkImage>& snapshotImage) const;
+ sk_sp<SkShader> getShader(float width, float height, const sk_sp<SkImage>& snapshotImage,
+ const SkMatrix* matrix) const;
float maxStretchAmountX = 0;
float maxStretchAmountY = 0;