From 5ec6a2878b2ad933c5da6fe2341c854155acc24c Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Tue, 23 Jun 2015 15:42:12 -0700 Subject: Unify clipping return value behavior - true if not empty bug:22035484 Change-Id: I23ecca38554a60c590181290900deb0e2c48cea1 --- libs/hwui/SkiaCanvas.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/hwui') 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(); } // ---------------------------------------------------------------------------- -- cgit v1.1