From 80746c2bd2de5ce94c4cfd4429aeca47529df01a Mon Sep 17 00:00:00 2001 From: Florin Malita Date: Sat, 30 Dec 2017 12:39:11 -0500 Subject: [PATCH] [sksg] Fix inval rect mapping Return false from mapRect() doesn't mean the op failed. TBR= Change-Id: I0582fde3efaa792010f27e3684cfe9c4332e29dc Reviewed-on: https://skia-review.googlesource.com/90021 Reviewed-by: Florin Malita Commit-Queue: Florin Malita --- experimental/sksg/SkSGInvalidationController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/experimental/sksg/SkSGInvalidationController.cpp b/experimental/sksg/SkSGInvalidationController.cpp index 114d724d1c..4b133d871b 100644 --- a/experimental/sksg/SkSGInvalidationController.cpp +++ b/experimental/sksg/SkSGInvalidationController.cpp @@ -17,8 +17,8 @@ InvalidationController::InvalidationController() {} void InvalidationController::inval(const SkRect& r, const SkMatrix& ctm) { SkTCopyOnFirstWrite rect(r); - if (!ctm.isIdentity() && !ctm.mapRect(rect.writable())) { - *rect.writable() = SkRect::MakeLTRB(SK_ScalarMin, SK_ScalarMin, SK_ScalarMax, SK_ScalarMax); + if (!ctm.isIdentity()) { + ctm.mapRect(rect.writable()); } fRects.push(*rect);