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_Hairline.cpp

Issue 1084433002: change hairline procs to take SkPoint by value, more efficient on SSE and NEON (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/SkScan_Antihair.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScan_Hairline.cpp
diff --git a/src/core/SkScan_Hairline.cpp b/src/core/SkScan_Hairline.cpp
index bd597b3d68c155486d0994b73b385b343334d290..8cce57b8c97d4869b26fc50503ffa259db55fb4e 100644
--- a/src/core/SkScan_Hairline.cpp
+++ b/src/core/SkScan_Hairline.cpp
@@ -40,8 +40,7 @@ static bool canConvertFDot6ToFixed(SkFDot6 x) {
}
#endif
-void SkScan::HairLineRgn(const SkPoint& pt0, const SkPoint& pt1,
- const SkRegion* clip, SkBlitter* blitter) {
+void SkScan::HairLineRgn(SkPoint pt0, SkPoint pt1, const SkRegion* clip, SkBlitter* blitter) {
SkBlitterClipper clipper;
SkRect r;
SkIRect clipR, ptsR;
@@ -210,8 +209,7 @@ static int compute_int_quad_dist(const SkPoint pts[3]) {
}
}
-typedef void (*LineProc)(const SkPoint&, const SkPoint&, const SkRegion*,
- SkBlitter*);
+typedef void (*LineProc)(SkPoint, SkPoint, const SkRegion*, SkBlitter*);
static void hairquad(const SkPoint pts[3], const SkRegion* clip,
SkBlitter* blitter, int level, LineProc lineproc) {
@@ -257,8 +255,8 @@ static int compute_quad_level(const SkPoint pts[3]) {
return level;
}
-static void hair_path(const SkPath& path, const SkRasterClip& rclip,
- SkBlitter* blitter, LineProc lineproc) {
+static void hair_path(const SkPath& path, const SkRasterClip& rclip, SkBlitter* blitter,
+ LineProc lineproc) {
if (path.isEmpty()) {
return;
}
@@ -321,13 +319,11 @@ static void hair_path(const SkPath& path, const SkRasterClip& rclip,
}
}
-void SkScan::HairPath(const SkPath& path, const SkRasterClip& clip,
- SkBlitter* blitter) {
+void SkScan::HairPath(const SkPath& path, const SkRasterClip& clip, SkBlitter* blitter) {
hair_path(path, clip, blitter, SkScan::HairLineRgn);
}
-void SkScan::AntiHairPath(const SkPath& path, const SkRasterClip& clip,
- SkBlitter* blitter) {
+void SkScan::AntiHairPath(const SkPath& path, const SkRasterClip& clip, SkBlitter* blitter) {
hair_path(path, clip, blitter, SkScan::AntiHairLineRgn);
}
@@ -368,8 +364,7 @@ void SkScan::FrameRect(const SkRect& r, const SkPoint& strokeSize,
SkScan::FillRect(tmp, clip, blitter);
}
-void SkScan::HairLine(const SkPoint& p0, const SkPoint& p1,
- const SkRasterClip& clip, SkBlitter* blitter) {
+void SkScan::HairLine(SkPoint p0, SkPoint p1, const SkRasterClip& clip, SkBlitter* blitter) {
if (clip.isBW()) {
HairLineRgn(p0, p1, &clip.bwRgn(), blitter);
} else {
@@ -389,8 +384,7 @@ void SkScan::HairLine(const SkPoint& p0, const SkPoint& p1,
}
}
-void SkScan::AntiHairLine(const SkPoint& p0, const SkPoint& p1,
- const SkRasterClip& clip, SkBlitter* blitter) {
+void SkScan::AntiHairLine(SkPoint p0, SkPoint p1, const SkRasterClip& clip, SkBlitter* blitter) {
if (clip.isBW()) {
AntiHairLineRgn(p0, p1, &clip.bwRgn(), blitter);
} else {
« no previous file with comments | « src/core/SkScan_Antihair.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698