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

Unified Diff: src/core/SkEdge.h

Issue 692583002: WIP: GPU-accelerated trapezoidal path renderer. Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rename GrTrapezoidalPathRenderer -> GrAAConcavePathRenderer; swap MSAA support for a coverage ramp. Created 5 years, 4 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 | « samplecode/SampleConcavePaths.cpp ('k') | src/core/SkEdge.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkEdge.h
diff --git a/src/core/SkEdge.h b/src/core/SkEdge.h
index db6f43085dadf88bd4b28cd128a2280d86935d92..f9175591df9b608d5392d25bf57253d9dec707c3 100644
--- a/src/core/SkEdge.h
+++ b/src/core/SkEdge.h
@@ -29,6 +29,8 @@ struct SkEdge {
SkFixed fX;
SkFixed fDX;
+ float fFirstXf; // only used for trapezoidal renderer
+ float fFirstYf; // only used for trapezoidal renderer
int32_t fFirstY;
int32_t fLastY;
int8_t fCurveCount; // only used by kQuad(+) and kCubic(-)
@@ -122,8 +124,10 @@ int SkEdge::setLine(const SkPoint& p0, const SkPoint& p1, int shift) {
const SkFDot6 dy = SkEdge_Compute_DY(top, y0);
fX = SkFDot6ToFixed(x0 + SkFixedMul(slope, dy)); // + SK_Fixed1/2
+ fFirstXf = winding < 0 ? p1.fX : p0.fX;
fDX = slope;
fFirstY = top;
+ fFirstYf = static_cast<float>(top);
fLastY = bot - 1;
fCurveCount = 0;
fWinding = SkToS8(winding);
« no previous file with comments | « samplecode/SampleConcavePaths.cpp ('k') | src/core/SkEdge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698