Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Unified Diff: src/gpu/GrPathRenderer.h

Issue 15465005: Reland path bounds change with correct bounds for convex and hairline path renderers. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: tighter tolerances Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrPathRenderer.h
diff --git a/src/gpu/GrPathRenderer.h b/src/gpu/GrPathRenderer.h
index ebd464ffb3af6585e63b7c2401d33eecec7189cd..3d4c993c5287669a69db770b4c4cc77c02d5cf12 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;

Powered by Google App Engine
This is Rietveld 408576698