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:
parent
0bed5bb8be
commit
fe69b50378
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user