aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/sksg/effects/SkSGTransform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/sksg/effects/SkSGTransform.cpp')
-rw-r--r--experimental/sksg/effects/SkSGTransform.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/experimental/sksg/effects/SkSGTransform.cpp b/experimental/sksg/effects/SkSGTransform.cpp
index ce83599871..ca4c5cd162 100644
--- a/experimental/sksg/effects/SkSGTransform.cpp
+++ b/experimental/sksg/effects/SkSGTransform.cpp
@@ -21,9 +21,13 @@ void Transform::onRender(SkCanvas* canvas) const {
this->INHERITED::onRender(canvas);
}
-void Transform::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) {
- const auto localCTM = SkMatrix::Concat(ctm, fMatrix);
- this->INHERITED::onRevalidate(ic, localCTM);
+SkRect Transform::onRevalidate(InvalidationController* ic, const SkMatrix& ctm) {
+ SkASSERT(this->hasInval());
+
+ auto bounds = this->INHERITED::onRevalidate(ic, SkMatrix::Concat(ctm, fMatrix));
+ fMatrix.mapRect(&bounds);
+
+ return bounds;
}
} // namespace sksg