summaryrefslogtreecommitdiff
path: root/libs/hwui/DamageAccumulator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/hwui/DamageAccumulator.cpp')
-rw-r--r--libs/hwui/DamageAccumulator.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/libs/hwui/DamageAccumulator.cpp b/libs/hwui/DamageAccumulator.cpp
index b39f4f20dc0d..0bf948006ea0 100644
--- a/libs/hwui/DamageAccumulator.cpp
+++ b/libs/hwui/DamageAccumulator.cpp
@@ -249,5 +249,20 @@ void DamageAccumulator::finish(SkRect* totalDirty) {
mHead->pendingDirty.setEmpty();
}
+const StretchEffect* DamageAccumulator::findNearestStretchEffect() const {
+ DirtyStack* frame = mHead;
+ while (frame->prev != frame) {
+ frame = frame->prev;
+ if (frame->type == TransformRenderNode) {
+ const auto& effect =
+ frame->renderNode->properties().layerProperties().getStretchEffect();
+ if (!effect.isEmpty()) {
+ return &effect;
+ }
+ }
+ }
+ return nullptr;
+}
+
} /* namespace uirenderer */
} /* namespace android */