5e1ddb1086
Reason for revert: chrome changes have landed Original issue's description: > Revert of change all factories to return their base-class (patchset #1 id:1 of https://codereview.chromium.org/1535353002/ ) > > Reason for revert: > need to update some chrome/blink call-sites > > Original issue's description: > > change all factories to return their base-class > > > > will watch DEPS roll to see if there are chrome sites needing updates > > > > BUG=skia: > > GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1535353002 > > > > TBR= > > > > Committed: https://skia.googlesource.com/skia/+/d63f60a36327e9580861205ebb35cade8c49bd34 > > TBR= > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=skia: > > Committed: https://skia.googlesource.com/skia/+/2d6ba6690f8951e152d8e793191b14afd52f5506 TBR= NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/1533373002
48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
/*
|
|
* Copyright 2006 The Android Open Source Project
|
|
*
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*/
|
|
|
|
#ifndef SkCornerPathEffect_DEFINED
|
|
#define SkCornerPathEffect_DEFINED
|
|
|
|
#include "SkPathEffect.h"
|
|
|
|
/** \class SkCornerPathEffect
|
|
|
|
SkCornerPathEffect is a subclass of SkPathEffect that can turn sharp corners
|
|
into various treatments (e.g. rounded corners)
|
|
*/
|
|
class SK_API SkCornerPathEffect : public SkPathEffect {
|
|
public:
|
|
/** radius must be > 0 to have an effect. It specifies the distance from each corner
|
|
that should be "rounded".
|
|
*/
|
|
static SkPathEffect* Create(SkScalar radius) { return new SkCornerPathEffect(radius); }
|
|
|
|
virtual bool filterPath(SkPath* dst, const SkPath& src,
|
|
SkStrokeRec*, const SkRect*) const override;
|
|
|
|
SK_TO_STRING_OVERRIDE()
|
|
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkCornerPathEffect)
|
|
|
|
#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
|
|
bool exposedInAndroidJavaAPI() const override { return true; }
|
|
#endif
|
|
|
|
protected:
|
|
virtual ~SkCornerPathEffect();
|
|
|
|
explicit SkCornerPathEffect(SkScalar radius);
|
|
void flatten(SkWriteBuffer&) const override;
|
|
|
|
private:
|
|
SkScalar fRadius;
|
|
|
|
typedef SkPathEffect INHERITED;
|
|
};
|
|
|
|
#endif
|