diff options
author | 2017-01-04 14:57:43 -0500 | |
---|---|---|
committer | 2017-01-04 14:57:43 -0500 | |
commit | b29b16e5423fe7deab8ebf3da512c6d2192f19b5 (patch) | |
tree | 6e0c9b68f6cf30fddb28f358e373c2cefa3d37a8 /libs/hwui/SkiaCanvas.cpp | |
parent | e5fb79bb2def5a17d158193c2e668224dc5ad5c1 (diff) |
Remove clipRegion from the public API.
This API is difficult to support for printing and has other negative
effects as it does not respect the current matrix/clip.
Test: compile
Bug: 14650725
Change-Id: I71f9bd687d446c7ce8910d755421aad8e09458db
Diffstat (limited to 'libs/hwui/SkiaCanvas.cpp')
-rw-r--r-- | libs/hwui/SkiaCanvas.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index 8cae771f39b2..344df0a70da5 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -416,23 +416,6 @@ bool SkiaCanvas::clipPath(const SkPath* path, SkClipOp op) { return !mCanvas->isClipEmpty(); } -bool SkiaCanvas::clipRegion(const SkRegion* region, SkClipOp op) { - SkPath rgnPath; - if (region->getBoundaryPath(&rgnPath)) { - // The region is specified in device space. - SkMatrix savedMatrix = mCanvas->getTotalMatrix(); - mCanvas->resetMatrix(); - this->recordClip(rgnPath, op); - mCanvas->clipPath(rgnPath, op); - mCanvas->setMatrix(savedMatrix); - } else { - const auto emptyClip = SkRect::MakeEmpty(); - this->recordClip(emptyClip, op); - mCanvas->clipRect(emptyClip, op); - } - return !mCanvas->isClipEmpty(); -} - // ---------------------------------------------------------------------------- // Canvas state operations: Filters // ---------------------------------------------------------------------------- |