aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-07-22 22:12:59 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-24 12:53:19 +0000
commit40e7e655341c5bf56e398cd2f5902dda79d702a0 (patch)
tree1f4e887f232d53e24a9cdf791eea8660c9dac70b /samplecode
parent71f867c2294655ccf8981500ad5a3beefb71295e (diff)
remove (unused?) arcto patheffect
Bug: skia: Change-Id: I80943cc495eb1edce839387f4b9512a66a4e5c11 Reviewed-on: https://skia-review.googlesource.com/25981 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'samplecode')
-rw-r--r--samplecode/SampleFilterFuzz.cpp8
-rw-r--r--samplecode/SamplePath.cpp21
2 files changed, 7 insertions, 22 deletions
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index dcb740d4d8..ec9476fcfe 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -8,7 +8,6 @@
#include "Sk1DPathEffect.h"
#include "Sk2DPathEffect.h"
#include "SkAlphaThresholdFilter.h"
-#include "SkArcToPathEffect.h"
#include "SkBlurImageFilter.h"
#include "SkBlurMaskFilter.h"
#include "SkCanvas.h"
@@ -418,9 +417,9 @@ static sk_sp<SkPathEffect> make_path_effect(bool canBeNull = true) {
sk_sp<SkPathEffect> pathEffect;
if (canBeNull && (R(3) == 1)) { return pathEffect; }
- switch (R(9)) {
+ switch (R(8)) {
case 0:
- pathEffect = SkArcToPathEffect::Make(make_scalar(true));
+ pathEffect = SkPath2DPathEffect::Make(make_matrix(), make_path());
break;
case 1:
pathEffect = SkPathEffect::MakeCompose(make_path_effect(false),
@@ -449,9 +448,6 @@ static sk_sp<SkPathEffect> make_path_effect(bool canBeNull = true) {
pathEffect = SkLine2DPathEffect::Make(make_scalar(), make_matrix());
break;
case 7:
- pathEffect = SkPath2DPathEffect::Make(make_matrix(), make_path());
- break;
- case 8:
default:
pathEffect = SkPathEffect::MakeSum(make_path_effect(false),
make_path_effect(false));
diff --git a/samplecode/SamplePath.cpp b/samplecode/SamplePath.cpp
index 6438dcfb7d..0fb528774b 100644
--- a/samplecode/SamplePath.cpp
+++ b/samplecode/SamplePath.cpp
@@ -208,13 +208,12 @@ DEF_SAMPLE( return new PathView; )
//////////////////////////////////////////////////////////////////////////////
-#include "SkArcToPathEffect.h"
#include "SkCornerPathEffect.h"
#include "SkRandom.h"
class ArcToView : public SampleView {
- bool fDoFrame, fDoArcTo, fDoCorner, fDoConic;
- SkPaint fPtsPaint, fArcToPaint, fSkeletonPaint, fCornerPaint;
+ bool fDoFrame, fDoCorner, fDoConic;
+ SkPaint fPtsPaint, fSkeletonPaint, fCornerPaint;
public:
enum {
N = 4
@@ -222,7 +221,7 @@ public:
SkPoint fPts[N];
ArcToView()
- : fDoFrame(false), fDoArcTo(false), fDoCorner(false), fDoConic(false)
+ : fDoFrame(false), fDoCorner(false), fDoConic(false)
{
SkRandom rand;
for (int i = 0; i < N; ++i) {
@@ -236,12 +235,6 @@ public:
fPtsPaint.setStrokeWidth(15);
fPtsPaint.setStrokeCap(SkPaint::kRound_Cap);
- fArcToPaint.setAntiAlias(true);
- fArcToPaint.setStyle(SkPaint::kStroke_Style);
- fArcToPaint.setStrokeWidth(9);
- fArcToPaint.setColor(0x800000FF);
- fArcToPaint.setPathEffect(SkArcToPathEffect::Make(rad));
-
fCornerPaint.setAntiAlias(true);
fCornerPaint.setStyle(SkPaint::kStroke_Style);
fCornerPaint.setStrokeWidth(13);
@@ -269,9 +262,8 @@ protected:
if (SampleCode::CharQ(*evt, &uni)) {
switch (uni) {
case '1': this->toggle(fDoFrame); return true;
- case '2': this->toggle(fDoArcTo); return true;
- case '3': this->toggle(fDoCorner); return true;
- case '4': this->toggle(fDoConic); return true;
+ case '2': this->toggle(fDoCorner); return true;
+ case '3': this->toggle(fDoConic); return true;
default: break;
}
}
@@ -297,9 +289,6 @@ protected:
if (fDoCorner) {
canvas->drawPath(path, fCornerPaint);
}
- if (fDoArcTo) {
- canvas->drawPath(path, fArcToPaint);
- }
canvas->drawPath(path, fSkeletonPaint);
}