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

Unified Diff: src/core/SkScan.h

Issue 1085883002: change hairline procs to take array of points (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 8 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
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkScan_Antihair.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScan.h
diff --git a/src/core/SkScan.h b/src/core/SkScan.h
index 96c58c5f370962f21b31f7932d34677c3a88ff4a..ef44873569603ee282acfe969f6ba6d38ce0e3bb 100644
--- a/src/core/SkScan.h
+++ b/src/core/SkScan.h
@@ -24,6 +24,15 @@ typedef SkIRect SkXRect;
class SkScan {
public:
+ /*
+ * Draws count-1 line segments, one at a time:
+ * line(pts[0], pts[1])
+ * line(pts[1], pts[2])
+ * line(......, pts[count - 1])
+ */
+ typedef void (*HairRgnProc)(const SkPoint[], int count, const SkRegion*, SkBlitter*);
+ typedef void (*HairRCProc)(const SkPoint[], int count, const SkRasterClip&, SkBlitter*);
+
static void FillPath(const SkPath&, const SkIRect&, SkBlitter*);
///////////////////////////////////////////////////////////////////////////
@@ -41,8 +50,8 @@ public:
static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize,
const SkRasterClip&, SkBlitter*);
static void FillTriangle(const SkPoint pts[], const SkRasterClip&, SkBlitter*);
- static void HairLine(SkPoint, SkPoint, const SkRasterClip&, SkBlitter*);
- static void AntiHairLine(SkPoint, SkPoint, const SkRasterClip&, SkBlitter*);
+ static void HairLine(const SkPoint[], int count, const SkRasterClip&, SkBlitter*);
+ static void AntiHairLine(const SkPoint[], int count, const SkRasterClip&, SkBlitter*);
static void HairRect(const SkRect&, const SkRasterClip&, SkBlitter*);
static void AntiHairRect(const SkRect&, const SkRasterClip&, SkBlitter*);
static void HairPath(const SkPath&, const SkRasterClip&, SkBlitter*);
@@ -64,8 +73,8 @@ private:
static void AntiFrameRect(const SkRect&, const SkPoint& strokeSize,
const SkRegion*, SkBlitter*);
- static void HairLineRgn(SkPoint, SkPoint, const SkRegion*, SkBlitter*);
- static void AntiHairLineRgn(SkPoint, SkPoint, const SkRegion*, SkBlitter*);
+ static void HairLineRgn(const SkPoint[], int count, const SkRegion*, SkBlitter*);
+ static void AntiHairLineRgn(const SkPoint[], int count, const SkRegion*, SkBlitter*);
};
/** Assign an SkXRect from a SkIRect, by promoting the src rect's coordinates
« no previous file with comments | « src/core/SkDraw.cpp ('k') | src/core/SkScan_Antihair.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698