remove unused clip parameter to SkEdge::setClip
BUG=skia:
Review URL: https://codereview.chromium.org/1019183002
diff --git a/src/core/SkEdge.cpp b/src/core/SkEdge.cpp
index 11d954e..f91f5f8 100644
--- a/src/core/SkEdge.cpp
+++ b/src/core/SkEdge.cpp
@@ -332,8 +332,7 @@
return SkMax32(SkAbs32(oneThird), SkAbs32(twoThird));
}
-int SkCubicEdge::setCubic(const SkPoint pts[4], const SkIRect* clip, int shift)
-{
+int SkCubicEdge::setCubic(const SkPoint pts[4], int shift) {
SkFDot6 x0, y0, x1, y1, x2, y2, x3, y3;
{
@@ -376,10 +375,6 @@
if (top == bot)
return 0;
- // are we completely above or below the clip?
- if (clip && (top >= clip->fBottom || bot <= clip->fTop))
- return 0;
-
// compute number of steps needed (1 << shift)
{
// Can't use (center of curve - center of baseline), since center-of-curve
@@ -433,16 +428,6 @@
fCLastX = SkFDot6ToFixed(x3);
fCLastY = SkFDot6ToFixed(y3);
- if (clip)
- {
- do {
- if (!this->updateCubic()) {
- return 0;
- }
- } while (!this->intersectsClip(*clip));
- this->chopLineWithClip(*clip);
- return 1;
- }
return this->updateCubic();
}
diff --git a/src/core/SkEdge.h b/src/core/SkEdge.h
index 09c021c..db6f430 100644
--- a/src/core/SkEdge.h
+++ b/src/core/SkEdge.h
@@ -36,8 +36,7 @@
uint8_t fCubicDShift; // applied to fCDx and fCDy only in cubic
int8_t fWinding; // 1 or -1
- int setLine(const SkPoint& p0, const SkPoint& p1, const SkIRect* clip,
- int shiftUp);
+ int setLine(const SkPoint& p0, const SkPoint& p1, const SkIRect* clip, int shiftUp);
// call this version if you know you don't have a clip
inline int setLine(const SkPoint& p0, const SkPoint& p1, int shiftUp);
inline int updateLine(SkFixed ax, SkFixed ay, SkFixed bx, SkFixed by);
@@ -81,7 +80,7 @@
SkFixed fCDDDx, fCDDDy;
SkFixed fCLastX, fCLastY;
- int setCubic(const SkPoint pts[4], const SkIRect* clip, int shiftUp);
+ int setCubic(const SkPoint pts[4], int shiftUp);
int updateCubic();
};
diff --git a/src/core/SkEdgeBuilder.cpp b/src/core/SkEdgeBuilder.cpp
index 6a8ea89..43181fd 100644
--- a/src/core/SkEdgeBuilder.cpp
+++ b/src/core/SkEdgeBuilder.cpp
@@ -42,7 +42,7 @@
void SkEdgeBuilder::addCubic(const SkPoint pts[]) {
SkCubicEdge* edge = typedAllocThrow<SkCubicEdge>(fAlloc);
- if (edge->setCubic(pts, NULL, fShiftUp)) {
+ if (edge->setCubic(pts, fShiftUp)) {
fList.push(edge);
} else {
// TODO: unallocate edge from storage...