diff options
author | Chris Craik <ccraik@google.com> | 2015-06-23 15:42:12 -0700 |
---|---|---|
committer | Chris Craik <ccraik@google.com> | 2015-06-23 15:42:43 -0700 |
commit | 5ec6a2878b2ad933c5da6fe2341c854155acc24c (patch) | |
tree | 9f60a3aebc541a4141ee426a02a3293628bb286b /libs/hwui | |
parent | bcca4ac4fb4fa66f2e4196437998c08e4dbed1d3 (diff) | |
download | frameworks_base-5ec6a2878b2ad933c5da6fe2341c854155acc24c.zip frameworks_base-5ec6a2878b2ad933c5da6fe2341c854155acc24c.tar.gz frameworks_base-5ec6a2878b2ad933c5da6fe2341c854155acc24c.tar.bz2 |
Unify clipping return value behavior - true if not empty
bug:22035484
Change-Id: I23ecca38554a60c590181290900deb0e2c48cea1
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/SkiaCanvas.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/hwui/SkiaCanvas.cpp b/libs/hwui/SkiaCanvas.cpp index a323065..6cf66cd 100644 --- a/libs/hwui/SkiaCanvas.cpp +++ b/libs/hwui/SkiaCanvas.cpp @@ -419,12 +419,12 @@ bool SkiaCanvas::quickRejectPath(const SkPath& path) const { bool SkiaCanvas::clipRect(float left, float top, float right, float bottom, SkRegion::Op op) { SkRect rect = SkRect::MakeLTRB(left, top, right, bottom); mCanvas->clipRect(rect, op); - return mCanvas->isClipEmpty(); + return !mCanvas->isClipEmpty(); } bool SkiaCanvas::clipPath(const SkPath* path, SkRegion::Op op) { mCanvas->clipPath(*path, op); - return mCanvas->isClipEmpty(); + return !mCanvas->isClipEmpty(); } bool SkiaCanvas::clipRegion(const SkRegion* region, SkRegion::Op op) { @@ -438,7 +438,7 @@ bool SkiaCanvas::clipRegion(const SkRegion* region, SkRegion::Op op) { } else { mCanvas->clipRect(SkRect::MakeEmpty(), op); } - return mCanvas->isClipEmpty(); + return !mCanvas->isClipEmpty(); } // ---------------------------------------------------------------------------- |