fix incorrect GPU rendering for path inverse fill when path is outside the clip
Committed on behalf of Guanqun.Lu@gmail.com
Review URL: http://codereview.appspot.com/6296087/
git-svn-id: http://skia.googlecode.com/svn/trunk@4279 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index 1213c41..3122162 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -86,9 +86,12 @@
GrIRect pathIBounds;
pathSBounds.roundOut(&pathIBounds);
if (!pathBounds->intersect(pathIBounds)) {
+ // set the correct path bounds, as this would be used later.
+ *pathBounds = pathIBounds;
return false;
}
} else {
+ *pathBounds = GrIRect::EmptyIRect();
return false;
}
return true;
@@ -305,7 +308,11 @@
GrIRect pathBounds, clipBounds;
if (!get_path_and_clip_bounds(target, path, translate,
&pathBounds, &clipBounds)) {
- return true; // path is empty so there is nothing to do
+ if (GrIsFillInverted(fill)) {
+ draw_around_inv_path(target, stageMask,
+ clipBounds, pathBounds);
+ }
+ return true;
}
if (sw_draw_path_to_mask_texture(path, pathBounds,
fill, fContext,