aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRenderer.h
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-20 16:49:06 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-20 16:49:06 +0000
commit1dd9baa6c8faeb4ce837c39d179ce9c9a09719ef (patch)
tree88e17eed25b5991988421c66f1c69d430ead991f /src/gpu/GrPathRenderer.h
parent4b0757b7489ee5d6bd7149bbcdb0b2af6b7a21cb (diff)
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
Diffstat (limited to 'src/gpu/GrPathRenderer.h')
-rw-r--r--src/gpu/GrPathRenderer.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index ebd464ffb3..3d4c993c52 100644
--- a/src/gpu/GrPathRenderer.h
+++ b/src/gpu/GrPathRenderer.h
@@ -1,4 +1,4 @@
-
+
/*
* Copyright 2011 Google Inc.
*
@@ -173,6 +173,22 @@ protected:
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;