aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrPathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-17 13:31:40 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-05-17 13:31:40 +0000
commit2f2d1306ec2bc6604e1ad7815473668cb8e0a1f8 (patch)
tree8185d2d030a9fd6da91745cd1c0344b36a598d46 /src/gpu/GrPathRenderer.cpp
parent83d1a68141830cbfa0d5fca6f9c9bccf9c978ad2 (diff)
Revert "Revert "Pass bounds into draw calls in path renderers.""
This reverts commit 2b80eb179df14c7c8d67b8ef2b2ee60efc504f65. git-svn-id: http://skia.googlecode.com/svn/trunk@9176 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/GrPathRenderer.cpp')
-rw-r--r--src/gpu/GrPathRenderer.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpu/GrPathRenderer.cpp b/src/gpu/GrPathRenderer.cpp
index e0d2682bcd..e88db22b30 100644
--- a/src/gpu/GrPathRenderer.cpp
+++ b/src/gpu/GrPathRenderer.cpp
@@ -12,3 +12,15 @@ SK_DEFINE_INST_COUNT(GrPathRenderer)
GrPathRenderer::GrPathRenderer() {
}
+
+void GrPathRenderer::GetPathDevBounds(const SkPath& path,
+ int devW, int devH,
+ const SkMatrix& matrix,
+ SkRect* bounds) {
+ if (path.isInverseFillType()) {
+ *bounds = SkRect::MakeWH(SkIntToScalar(devW), SkIntToScalar(devH));
+ return;
+ }
+ *bounds = path.getBounds();
+ matrix.mapRect(bounds);
+}