| Index: src/core/SkCanvas.cpp
|
| diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
|
| index 23442779ce0406f403436c33560ac6fc7d15a970..0ce97fff20661f8e2c82aacb801d2bb1cf574718 100644
|
| --- a/src/core/SkCanvas.cpp
|
| +++ b/src/core/SkCanvas.cpp
|
| @@ -75,11 +75,13 @@
|
| }
|
|
|
| if (rect) {
|
| - const SkMatrix& ctm = this->getTotalMatrix();
|
| - if (!ctm.isScaleTranslate()) {
|
| + if (!this->getTotalMatrix().isScaleTranslate()) {
|
| return false; // conservative
|
| }
|
| - if (!ctm.mapRectScaleTranslate(*rect).contains(bounds)) {
|
| +
|
| + SkRect devRect;
|
| + this->getTotalMatrix().mapRectScaleTranslate(&devRect, *rect);
|
| + if (!devRect.contains(bounds)) {
|
| return false;
|
| }
|
| }
|
| @@ -1542,7 +1544,8 @@
|
| // Check if we can quick-accept the clip call (and do nothing)
|
| //
|
| if (SkRegion::kIntersect_Op == op && !doAA && fMCRec->fMatrix.isScaleTranslate()) {
|
| - SkRect devR = fMCRec->fMatrix.mapRectScaleTranslate(rect);
|
| + SkRect devR;
|
| + fMCRec->fMatrix.mapRectScaleTranslate(&devR, rect);
|
| // NOTE: this check is CTM specific, since we might round differently with a different
|
| // CTM. Thus this is only 100% reliable if there is not global CTM scale to be
|
| // applied later (i.e. if this is going into a picture).
|
| @@ -1582,7 +1585,7 @@
|
| const bool isScaleTrans = fMCRec->fMatrix.isScaleTranslate();
|
| SkRect devR;
|
| if (isScaleTrans) {
|
| - devR = fMCRec->fMatrix.mapRectScaleTranslate(rect);
|
| + fMCRec->fMatrix.mapRectScaleTranslate(&devR, rect);
|
| }
|
|
|
| #ifndef SK_SUPPORT_PRECHECK_CLIPRECT
|
|
|