check for identity in translate

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2331943002

TBR=
NOTREECHECKS=True
NOTRY=True

Review-Url: https://codereview.chromium.org/2331943002
This commit is contained in:
reed 2016-09-12 06:31:48 -07:00 committed by Commit bot
parent 0bed5bb8be
commit fe69b50378

View File

@ -1457,14 +1457,16 @@ void SkCanvas::internalDrawDevice(SkBaseDevice* srcDev, int x, int y, const SkPa
/////////////////////////////////////////////////////////////////////////////
void SkCanvas::translate(SkScalar dx, SkScalar dy) {
this->checkForDeferredSave();
fDeviceCMDirty = true;
fMCRec->fMatrix.preTranslate(dx,dy);
if (dx || dy) {
this->checkForDeferredSave();
fDeviceCMDirty = true;
fMCRec->fMatrix.preTranslate(dx,dy);
// Translate shouldn't affect the is-scale-translateness of the matrix.
SkASSERT(fIsScaleTranslate == fMCRec->fMatrix.isScaleTranslate());
// Translate shouldn't affect the is-scale-translateness of the matrix.
SkASSERT(fIsScaleTranslate == fMCRec->fMatrix.isScaleTranslate());
this->didTranslate(dx,dy);
this->didTranslate(dx,dy);
}
}
void SkCanvas::scale(SkScalar sx, SkScalar sy) {