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

Side by Side Diff: src/core/SkEdge.h

Issue 2388213003: Revert of Analytic AntiAlias for Convex Shapes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkEdge.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SkEdge_DEFINED 9 #ifndef SkEdge_DEFINED
10 #define SkEdge_DEFINED 10 #define SkEdge_DEFINED
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 } 61 }
62 #endif 62 #endif
63 }; 63 };
64 64
65 struct SkQuadraticEdge : public SkEdge { 65 struct SkQuadraticEdge : public SkEdge {
66 SkFixed fQx, fQy; 66 SkFixed fQx, fQy;
67 SkFixed fQDx, fQDy; 67 SkFixed fQDx, fQDy;
68 SkFixed fQDDx, fQDDy; 68 SkFixed fQDDx, fQDDy;
69 SkFixed fQLastX, fQLastY; 69 SkFixed fQLastX, fQLastY;
70 70
71 bool setQuadraticWithoutUpdate(const SkPoint pts[3], int shiftUp);
72 int setQuadratic(const SkPoint pts[3], int shiftUp); 71 int setQuadratic(const SkPoint pts[3], int shiftUp);
73 int updateQuadratic(); 72 int updateQuadratic();
74 }; 73 };
75 74
76 struct SkCubicEdge : public SkEdge { 75 struct SkCubicEdge : public SkEdge {
77 SkFixed fCx, fCy; 76 SkFixed fCx, fCy;
78 SkFixed fCDx, fCDy; 77 SkFixed fCDx, fCDy;
79 SkFixed fCDDx, fCDDy; 78 SkFixed fCDDx, fCDDy;
80 SkFixed fCDDDx, fCDDDy; 79 SkFixed fCDDDx, fCDDDy;
81 SkFixed fCLastX, fCLastY; 80 SkFixed fCLastX, fCLastY;
82 81
83 bool setCubicWithoutUpdate(const SkPoint pts[4], int shiftUp);
84 int setCubic(const SkPoint pts[4], int shiftUp); 82 int setCubic(const SkPoint pts[4], int shiftUp);
85 int updateCubic(); 83 int updateCubic();
86 }; 84 };
87 85
88 int SkEdge::setLine(const SkPoint& p0, const SkPoint& p1, int shift) { 86 int SkEdge::setLine(const SkPoint& p0, const SkPoint& p1, int shift) {
89 SkFDot6 x0, y0, x1, y1; 87 SkFDot6 x0, y0, x1, y1;
90 88
91 { 89 {
92 #ifdef SK_RASTERIZE_EVEN_ROUNDING 90 #ifdef SK_RASTERIZE_EVEN_ROUNDING
93 x0 = SkScalarRoundToFDot6(p0.fX, shift); 91 x0 = SkScalarRoundToFDot6(p0.fX, shift);
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 fX = SkFDot6ToFixed(x0 + SkFixedMul(slope, dy)); // + SK_Fixed1/2 123 fX = SkFDot6ToFixed(x0 + SkFixedMul(slope, dy)); // + SK_Fixed1/2
126 fDX = slope; 124 fDX = slope;
127 fFirstY = top; 125 fFirstY = top;
128 fLastY = bot - 1; 126 fLastY = bot - 1;
129 fCurveCount = 0; 127 fCurveCount = 0;
130 fWinding = SkToS8(winding); 128 fWinding = SkToS8(winding);
131 fCurveShift = 0; 129 fCurveShift = 0;
132 return 1; 130 return 1;
133 } 131 }
134 132
133
135 #endif 134 #endif
OLDNEW
« no previous file with comments | « src/core/SkBlitter.cpp ('k') | src/core/SkEdge.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698