Index: src/core/SkCanvas.cpp |
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp |
index 09c50c69b0248cf2dc83e95c87f07d662c80252c..304ba55750916ce9a0bf88a635a149d5c7ad980d 100644 |
--- a/src/core/SkCanvas.cpp |
+++ b/src/core/SkCanvas.cpp |
@@ -630,7 +630,7 @@ void SkCanvas::resetForNextPicture(const SkIRect& bounds) { |
// know that the device is an SkBitmapDevice (really an SkNoPixelsBitmapDevice). |
static_cast<SkBitmapDevice*>(fMCRec->fLayer->fDevice)->setNewSize(bounds.size()); |
fDeviceClipBounds = qr_clip_bounds(bounds); |
- fConservativeIsScaleTranslate = true; |
+ fIsScaleTranslate = true; |
} |
SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) { |
@@ -654,6 +654,7 @@ SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) { |
fMCRec = (MCRec*)fMCStack.push_back(); |
new (fMCRec) MCRec(fConservativeRasterClip); |
+ fIsScaleTranslate = true; |
SkASSERT(sizeof(DeviceCM) <= sizeof(fDeviceCMStorage)); |
fMCRec->fLayer = (DeviceCM*)fDeviceCMStorage; |
@@ -670,7 +671,6 @@ SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) { |
fMCRec->fLayer->fDevice = SkRef(device); |
fMCRec->fRasterClip.setRect(device->getGlobalBounds()); |
fDeviceClipBounds = qr_clip_bounds(device->getGlobalBounds()); |
- fConservativeIsScaleTranslate = true; |
} |
return device; |
@@ -1328,7 +1328,7 @@ void SkCanvas::internalRestore() { |
} |
if (fMCRec) { |
- fConservativeIsScaleTranslate = fMCRec->fMatrix.isScaleTranslate(); |
+ fIsScaleTranslate = fMCRec->fMatrix.isScaleTranslate(); |
fDeviceClipBounds = qr_clip_bounds(fMCRec->fRasterClip.getBounds()); |
} |
} |
@@ -1486,7 +1486,7 @@ void SkCanvas::concat(const SkMatrix& matrix) { |
this->checkForDeferredSave(); |
fDeviceCMDirty = true; |
fMCRec->fMatrix.preConcat(matrix); |
- fConservativeIsScaleTranslate = fMCRec->fMatrix.isScaleTranslate(); |
+ fIsScaleTranslate = fMCRec->fMatrix.isScaleTranslate(); |
this->didConcat(matrix); |
} |
@@ -1498,7 +1498,7 @@ void SkCanvas::internalSetMatrix(const SkMatrix& matrix) { |
void SkCanvas::setMatrix(const SkMatrix& matrix) { |
this->checkForDeferredSave(); |
this->internalSetMatrix(matrix); |
- fConservativeIsScaleTranslate = matrix.isScaleTranslate(); |
+ fIsScaleTranslate = matrix.isScaleTranslate(); |
this->didSetMatrix(matrix); |
} |
@@ -1844,11 +1844,11 @@ bool SkCanvas::quickReject(const SkRect& src) const { |
SkASSERT(tmp == fDeviceClipBounds); |
} |
- // Verify that fConservativeIsScaleTranslate is set properly. |
- SkASSERT(!fConservativeIsScaleTranslate || fMCRec->fMatrix.isScaleTranslate()); |
+ // Verify that fIsScaleTranslate is set properly. |
+ SkASSERT(fIsScaleTranslate == fMCRec->fMatrix.isScaleTranslate()); |
#endif |
- if (!fConservativeIsScaleTranslate) { |
+ if (!fIsScaleTranslate) { |
return quick_reject_slow_path(src, fDeviceClipBounds, fMCRec->fMatrix); |
} |