Commit 0c8ec2f6 authored by junov@chromium.org's avatar junov@chromium.org
Browse files

Fixing bounding box computation for inverse filled paths in SkBBoxRecord

BUG=http://code.google.com/p/skia/issues/detail?id=1014
TEST=gm emptypath with --tileGrid
Review URL: https://codereview.appspot.com/6944062

git-svn-id: http://skia.googlecode.com/svn/trunk@6865 2bbb7eff-a529-9590-31e7-b0007b416f81
parent 57850b9d
......@@ -27,7 +27,15 @@ void SkBBoxRecord::drawRect(const SkRect& rect, const SkPaint& paint) {
}
void SkBBoxRecord::drawPath(const SkPath& path, const SkPaint& paint) {
if (this->transformBounds(path.getBounds(), &paint)) {
if (path.isInverseFillType()) {
// If path is inverse filled, use the current clip bounds as the
// path's device-space bounding box.
SkIRect clipBounds;
if (this->getClipDeviceBounds(&clipBounds)) {
this->handleBBox(SkRect::MakeFromIRect(clipBounds));
INHERITED::drawPath(path, paint);
}
} else if (this->transformBounds(path.getBounds(), &paint)) {
INHERITED::drawPath(path, paint);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment