Reland path bounds change with correct bounds for convex and hairline path renderers.
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/15465005
git-svn-id: http://skia.googlecode.com/svn/trunk@9194 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index ebd464f..3d4c993 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -1,4 +1,4 @@
-
+
/*
* Copyright 2011 Google Inc.
*
@@ -173,6 +173,22 @@
this->drawPath(path, stroke, target, false);
}
+ // Helper for getting the device bounds of a path. Inverse filled paths will have bounds set
+ // by devSize. Non-inverse path bounds will not necessarily be clipped to devSize.
+ static void GetPathDevBounds(const SkPath& path,
+ int devW,
+ int devH,
+ const SkMatrix& matrix,
+ SkRect* bounds);
+
+ // Helper version that gets the dev width and height from a GrSurface.
+ static void GetPathDevBounds(const SkPath& path,
+ const GrSurface* device,
+ const SkMatrix& matrix,
+ SkRect* bounds) {
+ GetPathDevBounds(path, device->width(), device->height(), matrix, bounds);
+ }
+
private:
typedef GrRefCnt INHERITED;