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

Unified Diff: src/core/SkEdge.cpp

Issue 2393643002: Resubmit issue 2221103002 to fix the iOS build by declaring the flag in (Closed)
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkEdge.h ('k') | src/core/SkEdgeBuilder.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 d91c3e6bce8f26dd0b5283b056ac3882c31846d1..216604b551575cfd37ef58028a4576a72f591118 100644
--- a/src/core/SkEdge.cpp
+++ b/src/core/SkEdge.cpp
@@ -172,8 +172,7 @@ static inline int diff_to_shift(SkFDot6 dx, SkFDot6 dy)
return (32 - SkCLZ(dist)) >> 1;
}
-int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift)
-{
+bool SkQuadraticEdge::setQuadraticWithoutUpdate(const SkPoint pts[3], int shift) {
SkFDot6 x0, y0, x1, y1, x2, y2;
{
@@ -266,6 +265,13 @@ int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift)
fQLastX = SkFDot6ToFixed(x2);
fQLastY = SkFDot6ToFixed(y2);
+ return true;
+}
+
+int SkQuadraticEdge::setQuadratic(const SkPoint pts[3], int shift) {
+ if (!setQuadraticWithoutUpdate(pts, shift)) {
+ return 0;
+ }
return this->updateQuadratic();
}
@@ -332,7 +338,7 @@ static SkFDot6 cubic_delta_from_line(SkFDot6 a, SkFDot6 b, SkFDot6 c, SkFDot6 d)
return SkMax32(SkAbs32(oneThird), SkAbs32(twoThird));
}
-int SkCubicEdge::setCubic(const SkPoint pts[4], int shift) {
+bool SkCubicEdge::setCubicWithoutUpdate(const SkPoint pts[4], int shift) {
SkFDot6 x0, y0, x1, y1, x2, y2, x3, y3;
{
@@ -428,6 +434,13 @@ int SkCubicEdge::setCubic(const SkPoint pts[4], int shift) {
fCLastX = SkFDot6ToFixed(x3);
fCLastY = SkFDot6ToFixed(y3);
+ return true;
+}
+
+int SkCubicEdge::setCubic(const SkPoint pts[4], int shift) {
+ if (!this->setCubicWithoutUpdate(pts, shift)) {
+ return 0;
+ }
return this->updateCubic();
}
« no previous file with comments | « src/core/SkEdge.h ('k') | src/core/SkEdgeBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698