Minor refactoring of GrClipMaskManager::clipMaskPreamble
https://codereview.appspot.com/6495052/
git-svn-id: http://skia.googlecode.com/svn/trunk@5342 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index d80868d..c4c2edf 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -557,26 +557,23 @@
// unlike the stencil path the alpha path is not bound to the size of the
// render target - determine the minimum size required for the mask
// Note: intBounds is in device (as opposed to canvas) coordinates
- GrIRect devClipBounds;
- clipDataIn.getConservativeBounds(rt, &devClipBounds);
+ clipDataIn.getConservativeBounds(rt, devResultBounds);
// need to outset a pixel since the standard bounding box computation
// path doesn't leave any room for antialiasing (esp. w.r.t. rects)
- devClipBounds.outset(1, 1);
+ devResultBounds->outset(1, 1);
// TODO: make sure we don't outset if bounds are still 0,0 @ min
if (fAACache.canReuse(*clipDataIn.fClipStack,
- devClipBounds.width(),
- devClipBounds.height())) {
+ devResultBounds->width(),
+ devResultBounds->height())) {
*result = fAACache.getLastMask();
fAACache.getLastBound(devResultBounds);
return true;
}
- this->setupCache(*clipDataIn.fClipStack, devClipBounds);
-
- *devResultBounds = devClipBounds;
+ this->setupCache(*clipDataIn.fClipStack, *devResultBounds);
return false;
}