Fix: Release skia resources when RenderNode layer is configured
-Updated StretchEffect to null out the child texture
of the SkRuntimeEffectBuilder after the shader is created
-Release optional mask surface used for
stretching the hole punch
-Release SkRuntimeEffectBuilder instance on RenderNode's
StretchEffect
Fixes: 183592264
Test: manual + re-ran cts tests
Change-Id: I90952666d7489985de9ce798ab792cf3fd7f6087
diff --git a/libs/hwui/effects/StretchEffect.h b/libs/hwui/effects/StretchEffect.h
index 25777c2..3eab9f0 100644
--- a/libs/hwui/effects/StretchEffect.h
+++ b/libs/hwui/effects/StretchEffect.h
@@ -113,6 +113,10 @@
return !isEmpty();
}
+ void clear() {
+ mBuilder = nullptr;
+ }
+
private:
static sk_sp<SkRuntimeEffect> getStretchEffect();
mutable SkVector mStretchDirection{0, 0};