From 3e11c0bd92fbd12f59080c3f9450201d6105db83 Mon Sep 17 00:00:00 2001 From: "robertphillips@google.com" Date: Wed, 11 Jul 2012 18:20:35 +0000 Subject: Forced GrClip to always have conservative bounds http://codereview.appspot.com/6353089/ git-svn-id: http://skia.googlecode.com/svn/trunk@4545 2bbb7eff-a529-9590-31e7-b0007b416f81 --- src/gpu/GrClip.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gpu/GrClip.cpp') diff --git a/src/gpu/GrClip.cpp b/src/gpu/GrClip.cpp index a5120d4ff1..7803edcf75 100644 --- a/src/gpu/GrClip.cpp +++ b/src/gpu/GrClip.cpp @@ -29,7 +29,7 @@ GrClip::GrClip(const GrRect& rect) { } GrClip::GrClip(GrClipIterator* iter, GrScalar tx, GrScalar ty, - const GrRect* bounds) { + const GrRect& bounds) { this->setFromIterator(iter, tx, ty, bounds); } @@ -89,7 +89,7 @@ static void intersectWith(SkRect* dst, const SkRect& src) { } void GrClip::setFromIterator(GrClipIterator* iter, GrScalar tx, GrScalar ty, - const GrRect* conservativeBounds) { + const GrRect& conservativeBounds) { fList.reset(); fRequiresAA = false; @@ -148,8 +148,8 @@ void GrClip::setFromIterator(GrClipIterator* iter, GrScalar tx, GrScalar ty, if (isectRectValid && rectCount) { fConservativeBounds = fList[0].fRect; fConservativeBoundsValid = true; - } else if (NULL != conservativeBounds) { - fConservativeBounds = *conservativeBounds; + } else { + fConservativeBounds = conservativeBounds; fConservativeBoundsValid = true; } } -- cgit v1.2.3