aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrSoftwarePathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-02-10 08:16:55 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-10 08:16:55 -0800
commite85a32d4f8ce7fb9b6aaae89137dbf3766d833f2 (patch)
tree3b6a65e0ef71425284e4cf4f1f40faf58255ec55 /src/gpu/GrSoftwarePathRenderer.cpp
parentac928f27ab632784d6b9572901201caa2908caa5 (diff)
Clean up clipping code a bit
Diffstat (limited to 'src/gpu/GrSoftwarePathRenderer.cpp')
-rw-r--r--src/gpu/GrSoftwarePathRenderer.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 4fb7538b03..364c214a60 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -49,13 +49,11 @@ bool get_path_and_clip_bounds(const GrDrawTarget* target,
if (NULL == rt) {
return false;
}
- *devPathBounds = SkIRect::MakeWH(rt->width(), rt->height());
target->getClip()->getConservativeBounds(rt, devClipBounds);
- // TODO: getConservativeBounds already intersects with the
- // render target's bounding box. Remove this next line
- if (!devPathBounds->intersect(*devClipBounds)) {
+ if (devClipBounds->isEmpty()) {
+ *devPathBounds = SkIRect::MakeWH(rt->width(), rt->height());
return false;
}
@@ -64,6 +62,7 @@ bool get_path_and_clip_bounds(const GrDrawTarget* target,
matrix.mapRect(&pathSBounds, path.getBounds());
SkIRect pathIBounds;
pathSBounds.roundOut(&pathIBounds);
+ *devPathBounds = *devClipBounds;
if (!devPathBounds->intersect(pathIBounds)) {
// set the correct path bounds, as this would be used later.
*devPathBounds = pathIBounds;