diff options
author | caryclark <caryclark@google.com> | 2015-08-25 10:02:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-25 10:02:46 -0700 |
commit | 91298b47c547b2ab4697038c04685af957bd1416 (patch) | |
tree | e30ceb981717c4ad9ac2600b723d11bbab1cbeb5 /gm/strokes.cpp | |
parent | 6ec8b7cee7a8016ee8871faab58424ea7786c879 (diff) |
Revert of fix zero-length tangent (patchset #2 id:20001 of https://codereview.chromium.org/1311273002/ )
Reason for revert:
causes layout test to draw differently -- new drawing is more correct. Reverting until layout test ignore is landed.
Original issue's description:
> fix zero-length tangent
>
> If the end point and the control point are the same, computing
> the tangent will result in (0, 0). In this case, use the prior
> control point instead.
>
> R=reed@google.com
>
> BUG=skia:4191
>
> Committed: https://skia.googlesource.com/skia/+/7544124fb8ee744f68f549a353f8a9163cd7432d
TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:4191
Review URL: https://codereview.chromium.org/1312243002
Diffstat (limited to 'gm/strokes.cpp')
-rw-r--r-- | gm/strokes.cpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/gm/strokes.cpp b/gm/strokes.cpp index 0bcb039783..73823907a3 100644 --- a/gm/strokes.cpp +++ b/gm/strokes.cpp @@ -266,60 +266,6 @@ private: typedef skiagm::GM INHERITED; }; -// Test stroking for curves that produce degenerate tangents when t is 0 or 1 (see bug 4191) -class Strokes5GM : public skiagm::GM { -public: - Strokes5GM() {} - -protected: - - SkString onShortName() override { - return SkString("zero_control_stroke"); - } - - SkISize onISize() override { - return SkISize::Make(W, H*2); - } - - void onDraw(SkCanvas* canvas) override { - SkPaint p; - p.setColor(SK_ColorRED); - p.setAntiAlias(true); - p.setStyle(SkPaint::kStroke_Style); - p.setStrokeWidth(40); - p.setStrokeCap(SkPaint::kButt_Cap); - - SkPath path; - path.moveTo(157.474f,111.753f); - path.cubicTo(128.5f,111.5f,35.5f,29.5f,35.5f,29.5f); - canvas->drawPath(path, p); - path.reset(); - path.moveTo(250, 50); - path.quadTo(280, 80, 280, 80); - canvas->drawPath(path, p); - path.reset(); - path.moveTo(150, 50); - path.conicTo(180, 80, 180, 80, 0.707f); - canvas->drawPath(path, p); - - path.reset(); - path.moveTo(157.474f,311.753f); - path.cubicTo(157.474f,311.753f,85.5f,229.5f,35.5f,229.5f); - canvas->drawPath(path, p); - path.reset(); - path.moveTo(280, 250); - path.quadTo(280, 250, 310, 280); - canvas->drawPath(path, p); - path.reset(); - path.moveTo(180, 250); - path.conicTo(180, 250, 210, 280, 0.707f); - canvas->drawPath(path, p); - } - -private: - typedef skiagm::GM INHERITED; -}; - ////////////////////////////////////////////////////////////////////////////// @@ -327,10 +273,8 @@ static skiagm::GM* F0(void*) { return new StrokesGM; } static skiagm::GM* F1(void*) { return new Strokes2GM; } static skiagm::GM* F2(void*) { return new Strokes3GM; } static skiagm::GM* F3(void*) { return new Strokes4GM; } -static skiagm::GM* F4(void*) { return new Strokes5GM; } static skiagm::GMRegistry R0(F0); static skiagm::GMRegistry R1(F1); static skiagm::GMRegistry R2(F2); static skiagm::GMRegistry R3(F3); -static skiagm::GMRegistry R4(F4); |