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

Unified Diff: src/core/SkEdge.cpp

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 | « src/core/SkEdge.h ('k') | src/core/SkScan.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkEdge.cpp
diff --git a/src/core/SkEdge.cpp b/src/core/SkEdge.cpp
index f91f5f87829c45cd221dcefecfe00f6091f8f0e4..c2b2a7243650fa268fb413ba65143ae0435f066c 100644
--- a/src/core/SkEdge.cpp
+++ b/src/core/SkEdge.cpp
@@ -74,8 +74,10 @@ int SkEdge::setLine(const SkPoint& p0, const SkPoint& p1, const SkIRect* clip,
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);
@@ -266,6 +268,8 @@ int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift)
fQLastX = SkFDot6ToFixed(x2);
fQLastY = SkFDot6ToFixed(y2);
+ fFirstXf = winding < 0 ? pts[2].fX : pts[0].fX;
+ fFirstYf = static_cast<float>(top);
return this->updateQuadratic();
}
@@ -428,6 +432,8 @@ int SkCubicEdge::setCubic(const SkPoint pts[4], int shift) {
fCLastX = SkFDot6ToFixed(x3);
fCLastY = SkFDot6ToFixed(y3);
+ fFirstXf = winding < 0 ? pts[3].fX : pts[0].fX;
+ fFirstYf = static_cast<float>(top);
return this->updateCubic();
}
« no previous file with comments | « src/core/SkEdge.h ('k') | src/core/SkScan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698