| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2008 The Android Open Source Project | 2 * Copyright 2008 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "SkBitmapDevice.h" | 8 #include "SkBitmapDevice.h" |
| 9 #include "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkCanvasPriv.h" | 10 #include "SkCanvasPriv.h" |
| (...skipping 1470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1481 this->checkForDeferredSave(); | 1481 this->checkForDeferredSave(); |
| 1482 fDeviceCMDirty = true; | 1482 fDeviceCMDirty = true; |
| 1483 fMCRec->fMatrix.preConcat(matrix); | 1483 fMCRec->fMatrix.preConcat(matrix); |
| 1484 fIsScaleTranslate = fMCRec->fMatrix.isScaleTranslate(); | 1484 fIsScaleTranslate = fMCRec->fMatrix.isScaleTranslate(); |
| 1485 this->didConcat(matrix); | 1485 this->didConcat(matrix); |
| 1486 } | 1486 } |
| 1487 | 1487 |
| 1488 void SkCanvas::internalSetMatrix(const SkMatrix& matrix) { | 1488 void SkCanvas::internalSetMatrix(const SkMatrix& matrix) { |
| 1489 fDeviceCMDirty = true; | 1489 fDeviceCMDirty = true; |
| 1490 fMCRec->fMatrix = matrix; | 1490 fMCRec->fMatrix = matrix; |
| 1491 fIsScaleTranslate = matrix.isScaleTranslate(); |
| 1491 } | 1492 } |
| 1492 | 1493 |
| 1493 void SkCanvas::setMatrix(const SkMatrix& matrix) { | 1494 void SkCanvas::setMatrix(const SkMatrix& matrix) { |
| 1494 this->checkForDeferredSave(); | 1495 this->checkForDeferredSave(); |
| 1495 this->internalSetMatrix(matrix); | 1496 this->internalSetMatrix(matrix); |
| 1496 fIsScaleTranslate = matrix.isScaleTranslate(); | |
| 1497 this->didSetMatrix(matrix); | 1497 this->didSetMatrix(matrix); |
| 1498 } | 1498 } |
| 1499 | 1499 |
| 1500 void SkCanvas::resetMatrix() { | 1500 void SkCanvas::resetMatrix() { |
| 1501 this->setMatrix(SkMatrix::I()); | 1501 this->setMatrix(SkMatrix::I()); |
| 1502 } | 1502 } |
| 1503 | 1503 |
| 1504 #ifdef SK_EXPERIMENTAL_SHADOWING | 1504 #ifdef SK_EXPERIMENTAL_SHADOWING |
| 1505 void SkCanvas::translateZ(SkScalar z) { | 1505 void SkCanvas::translateZ(SkScalar z) { |
| 1506 this->checkForDeferredSave(); | 1506 this->checkForDeferredSave(); |
| (...skipping 1851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3358 | 3358 |
| 3359 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { | 3359 SkAutoCanvasMatrixPaint::~SkAutoCanvasMatrixPaint() { |
| 3360 fCanvas->restoreToCount(fSaveCount); | 3360 fCanvas->restoreToCount(fSaveCount); |
| 3361 } | 3361 } |
| 3362 | 3362 |
| 3363 #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API | 3363 #ifdef SK_SUPPORT_LEGACY_NEW_SURFACE_API |
| 3364 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p
rops) { | 3364 SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* p
rops) { |
| 3365 return this->makeSurface(info, props).release(); | 3365 return this->makeSurface(info, props).release(); |
| 3366 } | 3366 } |
| 3367 #endif | 3367 #endif |
| OLD | NEW |