diff options
Diffstat (limited to 'src/core/SkCanvas.cpp')
-rw-r--r-- | src/core/SkCanvas.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp index 569e9e59ba..c57ae9ae5f 100644 --- a/src/core/SkCanvas.cpp +++ b/src/core/SkCanvas.cpp @@ -1631,12 +1631,13 @@ void SkCanvas::updateClipConservativelyUsingBounds(const SkRect& bounds, SkRegio SkIRect deviceIBounds; this->getDevice()->getGlobalBounds(&deviceIBounds); deviceBounds = SkRect::Make(deviceIBounds); - this->SkCanvas::save(SkCanvas::kMatrix_SaveFlag); + // set the clip in device space + SkMatrix savedMatrix = this->getTotalMatrix(); this->SkCanvas::setMatrix(SkMatrix::I()); this->SkCanvas::onClipRect(deviceBounds, SkRegion::kReplace_Op, kHard_ClipEdgeStyle); - this->SkCanvas::restore(); //pop the matrix, but keep the clip + this->setMatrix(savedMatrix); break; } default: |