remove 4 legacy flags (clients already updated)
BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3785 Change-Id: I187e50e09ed7a3316719fae51af770259928fdf9 Reviewed-on: https://skia-review.googlesource.com/3785 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
c83ada98e2
commit
958788ab46
@ -134,21 +134,6 @@ public:
|
||||
*/
|
||||
static sk_sp<SkColorFilter> MakeMatrixFilterRowMajor255(const SkScalar array[20]);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
static SkColorFilter* CreateModeFilter(SkColor c, SkXfermode::Mode mode) {
|
||||
return MakeModeFilter(c, mode).release();
|
||||
}
|
||||
static SkColorFilter* CreateComposeFilter(SkColorFilter* outer, SkColorFilter* inner) {
|
||||
return MakeComposeFilter(sk_ref_sp(outer), sk_ref_sp(inner)).release();
|
||||
}
|
||||
static SkColorFilter* CreateMatrixFilterRowMajor255(const SkScalar array[20]) {
|
||||
return MakeMatrixFilterRowMajor255(array).release();
|
||||
}
|
||||
virtual SkColorFilter* newComposed(const SkColorFilter* inner) const {
|
||||
return this->makeComposed(sk_ref_sp(const_cast<SkColorFilter*>(inner))).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
/**
|
||||
* A subclass may implement this factory function to work with the GPU backend. It returns
|
||||
|
@ -176,11 +176,6 @@ public:
|
||||
bool readYUV8Planes(const SkISize[3], void* const planes[3], const size_t rowBytes[3],
|
||||
SkYUVColorSpace) const;
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
|
||||
SkShader* newShader(SkShader::TileMode, SkShader::TileMode,
|
||||
const SkMatrix* localMatrix = nullptr) const;
|
||||
#endif
|
||||
|
||||
sk_sp<SkShader> makeShader(SkShader::TileMode, SkShader::TileMode,
|
||||
const SkMatrix* localMatrix = nullptr) const;
|
||||
|
||||
|
@ -223,12 +223,6 @@ public:
|
||||
*/
|
||||
sk_sp<SkImageFilter> makeWithLocalMatrix(const SkMatrix&) const;
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
SkImageFilter* newWithLocalMatrix(const SkMatrix& matrix) const {
|
||||
return this->makeWithLocalMatrix(matrix).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* ImageFilters can natively handle scaling and translate components in the CTM. Only some of
|
||||
* them can handle affine (or more complex) matrices. This call returns true iff the filter
|
||||
@ -243,14 +237,6 @@ public:
|
||||
SkFilterQuality quality,
|
||||
sk_sp<SkImageFilter> input);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* CreateMatrixFilter(const SkMatrix& matrix,
|
||||
SkFilterQuality filterQuality,
|
||||
SkImageFilter* input = nullptr) {
|
||||
return MakeMatrixFilter(matrix, filterQuality, sk_ref_sp<SkImageFilter>(input)).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
SK_TO_STRING_PUREVIRT()
|
||||
SK_DEFINE_FLATTENABLE_TYPE(SkImageFilter)
|
||||
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
|
||||
|
@ -503,12 +503,8 @@ public:
|
||||
* If a previous shader exists, its reference count is decremented.
|
||||
* If shader is not NULL, its reference count is incremented.
|
||||
* @param shader May be NULL. The shader to be installed in the paint
|
||||
* @return shader
|
||||
*/
|
||||
void setShader(sk_sp<SkShader>);
|
||||
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
|
||||
SkShader* setShader(SkShader* shader);
|
||||
#endif
|
||||
|
||||
/** Get the paint's colorfilter. If there is a colorfilter, its reference
|
||||
count is not changed.
|
||||
@ -516,16 +512,12 @@ public:
|
||||
*/
|
||||
SkColorFilter* getColorFilter() const { return fColorFilter.get(); }
|
||||
|
||||
/** Set or clear the paint's colorfilter, returning the parameter.
|
||||
/** Set or clear the paint's colorfilter.
|
||||
<p />
|
||||
If the paint already has a filter, its reference count is decremented.
|
||||
If filter is not NULL, its reference count is incremented.
|
||||
@param filter May be NULL. The filter to be installed in the paint
|
||||
@return filter
|
||||
*/
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
SkColorFilter* setColorFilter(SkColorFilter* filter);
|
||||
#endif
|
||||
void setColorFilter(sk_sp<SkColorFilter>);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_OBJECT
|
||||
@ -544,12 +536,8 @@ public:
|
||||
If xfermode is not NULL, its reference count is incremented.
|
||||
@param xfermode May be NULL. The new xfermode to be installed in the
|
||||
paint
|
||||
@return xfermode
|
||||
*/
|
||||
void setXfermode(sk_sp<SkXfermode>);
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
SkXfermode* setXfermode(SkXfermode* xfermode);
|
||||
#endif
|
||||
|
||||
/** Create an xfermode based on the specified Mode, and assign it into the
|
||||
paint, returning the mode that was set. If the Mode is SrcOver, then
|
||||
|
@ -423,24 +423,6 @@ public:
|
||||
static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader> src,
|
||||
SkXfermode::Mode);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
|
||||
static SkShader* CreateEmptyShader() { return MakeEmptyShader().release(); }
|
||||
static SkShader* CreateColorShader(SkColor c) { return MakeColorShader(c).release(); }
|
||||
static SkShader* CreateBitmapShader(const SkBitmap& src, TileMode tmx, TileMode tmy,
|
||||
const SkMatrix* localMatrix = nullptr) {
|
||||
return MakeBitmapShader(src, tmx, tmy, localMatrix).release();
|
||||
}
|
||||
static SkShader* CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode::Mode mode);
|
||||
static SkShader* CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode* xfer);
|
||||
static SkShader* CreatePictureShader(const SkPicture* src, TileMode tmx, TileMode tmy,
|
||||
const SkMatrix* localMatrix, const SkRect* tile);
|
||||
|
||||
SkShader* newWithLocalMatrix(const SkMatrix& matrix) const {
|
||||
return this->makeWithLocalMatrix(matrix).release();
|
||||
}
|
||||
SkShader* newWithColorFilter(SkColorFilter* filter) const;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Create a new compose shader, given shaders dst, src, and a combining xfermode mode.
|
||||
* The xfermode is called with the output of the two shaders, and its output is returned.
|
||||
@ -450,10 +432,6 @@ public:
|
||||
*/
|
||||
static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader> src,
|
||||
sk_sp<SkXfermode> xfer);
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
static sk_sp<SkShader> MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader> src,
|
||||
SkXfermode* xfer);
|
||||
#endif
|
||||
|
||||
/** Call this to create a new shader that will draw with the specified bitmap.
|
||||
*
|
||||
|
@ -153,15 +153,6 @@ public:
|
||||
/** Return an SkXfermode object for the specified mode.
|
||||
*/
|
||||
static sk_sp<SkXfermode> Make(Mode);
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
static SkXfermode* Create(Mode mode) {
|
||||
return Make(mode).release();
|
||||
}
|
||||
SK_ATTR_DEPRECATED("use AsMode(...)")
|
||||
static bool IsMode(const SkXfermode* xfer, Mode* mode) {
|
||||
return AsMode(xfer, mode);
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Skia maintains global xfermode objects corresponding to each BlendMode. This returns a
|
||||
|
@ -26,13 +26,6 @@ public:
|
||||
const SkImageFilter::CropRect* cropRect = nullptr);
|
||||
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(const SkRegion& region, SkScalar innerMin,
|
||||
SkScalar outerMax, SkImageFilter* input = nullptr) {
|
||||
return Make(region, innerMin, outerMax, sk_ref_sp<SkImageFilter>(input)).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();
|
||||
};
|
||||
|
||||
|
@ -25,13 +25,6 @@ public:
|
||||
*/
|
||||
static sk_sp<SkXfermode> Make(SkScalar k1, SkScalar k2, SkScalar k3, SkScalar k4,
|
||||
bool enforcePMColor = true);
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
static SkXfermode* Create(SkScalar k1, SkScalar k2,
|
||||
SkScalar k3, SkScalar k4,
|
||||
bool enforcePMColor = true) {
|
||||
return Make(k1, k2, k3, k4, enforcePMColor).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();
|
||||
|
||||
|
@ -17,15 +17,6 @@ public:
|
||||
const SkImageFilter::CropRect* cropRect = nullptr) {
|
||||
return SkImageFilter::MakeBlur(sigmaX, sigmaY, input, cropRect);
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY,
|
||||
SkImageFilter * input = nullptr,
|
||||
const SkImageFilter::CropRect* cropRect = nullptr) {
|
||||
return SkImageFilter::MakeBlur(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>(input),
|
||||
cropRect).release();
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -22,10 +22,6 @@ public:
|
||||
*/
|
||||
static sk_sp<SkColorFilter> Make(sk_sp<SkData> cubeData, int cubeDimension);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
static SkColorFilter* Create(SkData* cubeData, int cubeDimension);
|
||||
#endif
|
||||
|
||||
void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
|
||||
uint32_t getFlags() const override;
|
||||
|
||||
|
@ -21,16 +21,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkColorFilterImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(SkColorFilter* cf,
|
||||
SkImageFilter* input = NULL,
|
||||
const CropRect* cropRect = NULL) {
|
||||
return Make(sk_ref_sp<SkColorFilter>(cf),
|
||||
sk_ref_sp<SkImageFilter>(input),
|
||||
cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
|
||||
|
@ -20,18 +20,6 @@ public:
|
||||
* are ignored.
|
||||
*/
|
||||
static sk_sp<SkColorFilter> MakeLightingFilter(SkColor mul, SkColor add);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
static SkColorFilter* Create(const SkColorMatrix& cm) {
|
||||
return SkColorFilter::MakeMatrixFilterRowMajor255(cm.fMat).release();
|
||||
}
|
||||
static SkColorFilter* Create(const SkScalar array[20]) {
|
||||
return SkColorFilter::MakeMatrixFilterRowMajor255(array).release();
|
||||
}
|
||||
static SkColorFilter* CreateLightingFilter(SkColor mul, SkColor add) {
|
||||
return MakeLightingFilter(mul, add).release();
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -19,13 +19,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(SkImageFilter* outer, SkImageFilter* inner) {
|
||||
return Make(sk_ref_sp<SkImageFilter>(outer),
|
||||
sk_ref_sp<SkImageFilter>(inner)).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
explicit SkComposeImageFilter(sk_sp<SkImageFilter> inputs[2]) : INHERITED(inputs, 2, nullptr) {
|
||||
SkASSERT(inputs[0].get());
|
||||
|
@ -39,19 +39,6 @@ public:
|
||||
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(ChannelSelectorType xChannelSelector,
|
||||
ChannelSelectorType yChannelSelector,
|
||||
SkScalar scale, SkImageFilter* displacement,
|
||||
SkImageFilter* color = nullptr,
|
||||
const CropRect* cropRect = nullptr) {
|
||||
return Make(xChannelSelector, yChannelSelector, scale,
|
||||
sk_ref_sp<SkImageFilter>(displacement),
|
||||
sk_ref_sp<SkImageFilter>(color),
|
||||
cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
|
||||
SkIPoint* offset) const override;
|
||||
|
@ -32,16 +32,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDropShadowImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(SkScalar dx, SkScalar dy, SkScalar sigmaX, SkScalar sigmaY,
|
||||
SkColor color, ShadowMode shadowMode,
|
||||
SkImageFilter* input = nullptr,
|
||||
const CropRect* cropRect = nullptr) {
|
||||
return Make(dx, dy, sigmaX, sigmaY, color, shadowMode,
|
||||
sk_ref_sp<SkImageFilter>(input), cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
|
||||
|
@ -22,10 +22,6 @@ class SK_API SkGammaColorFilter : public SkColorFilter {
|
||||
public:
|
||||
static sk_sp<SkColorFilter> Make(SkScalar gamma);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
static SkColorFilter* Create(SkScalar gamma) { return Make(gamma).release(); }
|
||||
#endif
|
||||
|
||||
void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
|
@ -198,60 +198,6 @@ public:
|
||||
return MakeSweep(cx, cy, colors, std::move(colorSpace), pos, count, 0, NULL);
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
|
||||
static SkShader* CreateLinear(const SkPoint pts[2],
|
||||
const SkColor colors[], const SkScalar pos[], int count,
|
||||
SkShader::TileMode mode,
|
||||
uint32_t flags, const SkMatrix* localMatrix) {
|
||||
return MakeLinear(pts, colors, pos, count, mode, flags, localMatrix).release();
|
||||
}
|
||||
static SkShader* CreateLinear(const SkPoint pts[2],
|
||||
const SkColor colors[], const SkScalar pos[], int count,
|
||||
SkShader::TileMode mode) {
|
||||
return CreateLinear(pts, colors, pos, count, mode, 0, NULL);
|
||||
}
|
||||
|
||||
static SkShader* CreateRadial(const SkPoint& center, SkScalar radius,
|
||||
const SkColor colors[], const SkScalar pos[], int count,
|
||||
SkShader::TileMode mode,
|
||||
uint32_t flags, const SkMatrix* localMatrix) {
|
||||
return MakeRadial(center, radius, colors, pos, count, mode, flags, localMatrix).release();
|
||||
}
|
||||
|
||||
static SkShader* CreateRadial(const SkPoint& center, SkScalar radius,
|
||||
const SkColor colors[], const SkScalar pos[], int count,
|
||||
SkShader::TileMode mode) {
|
||||
return CreateRadial(center, radius, colors, pos, count, mode, 0, NULL);
|
||||
}
|
||||
|
||||
static SkShader* CreateTwoPointConical(const SkPoint& start, SkScalar startRadius,
|
||||
const SkPoint& end, SkScalar endRadius,
|
||||
const SkColor colors[], const SkScalar pos[], int count,
|
||||
SkShader::TileMode mode,
|
||||
uint32_t flags, const SkMatrix* localMatrix) {
|
||||
return MakeTwoPointConical(start, startRadius, end, endRadius, colors, pos, count, mode,
|
||||
flags, localMatrix).release();
|
||||
}
|
||||
static SkShader* CreateTwoPointConical(const SkPoint& start, SkScalar startRadius,
|
||||
const SkPoint& end, SkScalar endRadius,
|
||||
const SkColor colors[], const SkScalar pos[], int count,
|
||||
SkShader::TileMode mode) {
|
||||
return CreateTwoPointConical(start, startRadius, end, endRadius, colors, pos, count, mode,
|
||||
0, NULL);
|
||||
}
|
||||
|
||||
static SkShader* CreateSweep(SkScalar cx, SkScalar cy,
|
||||
const SkColor colors[], const SkScalar pos[], int count,
|
||||
uint32_t flags, const SkMatrix* localMatrix) {
|
||||
return MakeSweep(cx, cy, colors, pos, count, flags, localMatrix).release();
|
||||
}
|
||||
static SkShader* CreateSweep(SkScalar cx, SkScalar cy,
|
||||
const SkColor colors[], const SkScalar pos[], int count) {
|
||||
return CreateSweep(cx, cy, colors, pos, count, 0, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
|
||||
};
|
||||
|
||||
|
@ -24,18 +24,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageSource)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(SkImage* image) {
|
||||
return Make(sk_ref_sp<SkImage>(image)).release();
|
||||
}
|
||||
static SkImageFilter* Create(SkImage* image,
|
||||
const SkRect& srcRect,
|
||||
const SkRect& dstRect,
|
||||
SkFilterQuality filterQuality) {
|
||||
return Make(sk_ref_sp<SkImage>(image), srcRect, dstRect, filterQuality).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
|
||||
|
@ -41,49 +41,6 @@ public:
|
||||
|
||||
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* CreateDistantLitDiffuse(const SkPoint3& direction,
|
||||
SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
|
||||
SkImageFilter* input = NULL, const CropRect* cropRect = NULL) {
|
||||
return MakeDistantLitDiffuse(direction, lightColor, surfaceScale, kd,
|
||||
sk_ref_sp<SkImageFilter>(input), cropRect).release();
|
||||
}
|
||||
static SkImageFilter* CreatePointLitDiffuse(const SkPoint3& location,
|
||||
SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
|
||||
SkImageFilter* input = NULL, const CropRect* cropRect = NULL) {
|
||||
return MakePointLitDiffuse(location, lightColor, surfaceScale, kd,
|
||||
sk_ref_sp<SkImageFilter>(input), cropRect).release();
|
||||
}
|
||||
static SkImageFilter* CreateSpotLitDiffuse(const SkPoint3& location,
|
||||
const SkPoint3& target, SkScalar specularExponent, SkScalar cutoffAngle,
|
||||
SkColor lightColor, SkScalar surfaceScale, SkScalar kd,
|
||||
SkImageFilter* input = NULL, const CropRect* cropRect = NULL) {
|
||||
return MakeSpotLitDiffuse(location, target, specularExponent, cutoffAngle,
|
||||
lightColor, surfaceScale, kd,
|
||||
sk_ref_sp<SkImageFilter>(input), cropRect).release();
|
||||
}
|
||||
static SkImageFilter* CreateDistantLitSpecular(const SkPoint3& direction,
|
||||
SkColor lightColor, SkScalar surfaceScale, SkScalar ks,
|
||||
SkScalar shininess, SkImageFilter* input = NULL, const CropRect* cropRect = NULL) {
|
||||
return MakeDistantLitSpecular(direction, lightColor, surfaceScale, ks, shininess,
|
||||
sk_ref_sp<SkImageFilter>(input), cropRect).release();
|
||||
}
|
||||
static SkImageFilter* CreatePointLitSpecular(const SkPoint3& location,
|
||||
SkColor lightColor, SkScalar surfaceScale, SkScalar ks,
|
||||
SkScalar shininess, SkImageFilter* input = NULL, const CropRect* cropRect = NULL) {
|
||||
return MakePointLitSpecular(location, lightColor, surfaceScale, ks, shininess,
|
||||
sk_ref_sp<SkImageFilter>(input), cropRect).release();
|
||||
}
|
||||
static SkImageFilter* CreateSpotLitSpecular(const SkPoint3& location,
|
||||
const SkPoint3& target, SkScalar specularExponent, SkScalar cutoffAngle,
|
||||
SkColor lightColor, SkScalar surfaceScale, SkScalar ks,
|
||||
SkScalar shininess, SkImageFilter* input = NULL, const CropRect* cropRect = NULL) {
|
||||
return MakeSpotLitSpecular(location, target, specularExponent, cutoffAngle,
|
||||
lightColor, surfaceScale, ks, shininess,
|
||||
sk_ref_sp<SkImageFilter>(input), cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
SkLightingImageFilter(sk_sp<SkImageFilterLight> light,
|
||||
SkScalar surfaceScale,
|
||||
|
@ -26,10 +26,6 @@ class SK_API SkLumaColorFilter : public SkColorFilter {
|
||||
public:
|
||||
static sk_sp<SkColorFilter> Make();
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
static SkColorFilter* Create() { return Make().release(); }
|
||||
#endif
|
||||
|
||||
void filterSpan(const SkPMColor src[], int count, SkPMColor[]) const override;
|
||||
|
||||
#if SK_SUPPORT_GPU
|
||||
|
@ -21,13 +21,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMagnifierImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(const SkRect& src, SkScalar inset,
|
||||
SkImageFilter* input = nullptr) {
|
||||
return Make(src, inset, sk_ref_sp<SkImageFilter>(input)).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
SkMagnifierImageFilter(const SkRect& srcRect,
|
||||
SkScalar inset,
|
||||
|
@ -67,21 +67,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(const SkISize& kernelSize,
|
||||
const SkScalar* kernel,
|
||||
SkScalar gain,
|
||||
SkScalar bias,
|
||||
const SkIPoint& kernelOffset,
|
||||
TileMode tileMode,
|
||||
bool convolveAlpha,
|
||||
SkImageFilter* input = NULL,
|
||||
const CropRect* cropRect = NULL) {
|
||||
return Make(kernelSize, kernel, gain, bias, kernelOffset, tileMode, convolveAlpha,
|
||||
sk_ref_sp<SkImageFilter>(input), cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
SkMatrixConvolutionImageFilter(const SkISize& kernelSize,
|
||||
const SkScalar* kernel,
|
||||
|
@ -27,26 +27,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMergeImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(SkImageFilter* first, SkImageFilter* second,
|
||||
SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode,
|
||||
const CropRect* cropRect = nullptr) {
|
||||
return Make(sk_ref_sp<SkImageFilter>(first),
|
||||
sk_ref_sp<SkImageFilter>(second),
|
||||
mode, cropRect).release();
|
||||
}
|
||||
|
||||
static SkImageFilter* Create(SkImageFilter* filters[], int count,
|
||||
const SkXfermode::Mode modes[] = nullptr,
|
||||
const CropRect* cropRect = nullptr) {
|
||||
SkAutoTDeleteArray<sk_sp<SkImageFilter>> temp(new sk_sp<SkImageFilter>[count]);
|
||||
for (int i = 0; i < count; ++i) {
|
||||
temp[i] = sk_ref_sp<SkImageFilter>(filters[i]);
|
||||
}
|
||||
return Make(temp.get(), count, modes, cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
|
||||
|
@ -62,16 +62,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDilateImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(int radiusX, int radiusY,
|
||||
SkImageFilter* input = nullptr,
|
||||
const CropRect* cropRect = nullptr) {
|
||||
return Make(radiusX, radiusY,
|
||||
sk_ref_sp<SkImageFilter>(input),
|
||||
cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
Op op() const override { return kDilate_Op; }
|
||||
|
||||
@ -94,16 +84,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkErodeImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(int radiusX, int radiusY,
|
||||
SkImageFilter* input = nullptr,
|
||||
const CropRect* cropRect = nullptr) {
|
||||
return Make(radiusX, radiusY,
|
||||
sk_ref_sp<SkImageFilter>(input),
|
||||
cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
Op op() const override { return kErode_Op; }
|
||||
|
||||
|
@ -22,13 +22,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkOffsetImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(SkScalar dx, SkScalar dy, SkImageFilter* input = nullptr,
|
||||
const CropRect* cropRect = nullptr) {
|
||||
return Make(dx, dy, sk_ref_sp(input), cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
|
||||
|
@ -29,12 +29,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPaintImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(const SkPaint& paint, const CropRect* rect = nullptr) {
|
||||
return Make(paint, rect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
|
||||
|
@ -62,24 +62,6 @@ public:
|
||||
int numOctaves, SkScalar seed,
|
||||
const SkISize* tileSize = nullptr);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
|
||||
static SkShader* CreateFractalNoise(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
|
||||
int numOctaves, SkScalar seed,
|
||||
const SkISize* tileSize = NULL) {
|
||||
return MakeFractalNoise(baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize).release();
|
||||
}
|
||||
static SkShader* CreateTurbulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
|
||||
int numOctaves, SkScalar seed,
|
||||
const SkISize* tileSize = NULL) {
|
||||
return MakeTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize).release();
|
||||
}
|
||||
static SkShader* CreateTubulence(SkScalar baseFrequencyX, SkScalar baseFrequencyY,
|
||||
int numOctaves, SkScalar seed,
|
||||
const SkISize* tileSize = NULL) {
|
||||
return CreateTurbulence(baseFrequencyX, baseFrequencyY, numOctaves, seed, tileSize);
|
||||
}
|
||||
#endif
|
||||
|
||||
class PerlinNoiseShaderContext : public SkShader::Context {
|
||||
public:
|
||||
PerlinNoiseShaderContext(const SkPerlinNoiseShader& shader, const ContextRec&);
|
||||
|
@ -35,22 +35,6 @@ public:
|
||||
const SkRect& cropRect,
|
||||
SkFilterQuality filterQuality);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(const SkPicture* picture) {
|
||||
return Make(sk_ref_sp(const_cast<SkPicture*>(picture))).release();
|
||||
}
|
||||
static SkImageFilter* Create(const SkPicture* picture, const SkRect& cropRect) {
|
||||
return Make(sk_ref_sp(const_cast<SkPicture*>(picture)), cropRect).release();
|
||||
}
|
||||
static SkImageFilter* CreateForLocalSpace(const SkPicture* picture,
|
||||
const SkRect& cropRect,
|
||||
SkFilterQuality filterQuality) {
|
||||
return MakeForLocalSpace(sk_ref_sp(const_cast<SkPicture*>(picture)),
|
||||
cropRect,
|
||||
filterQuality).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureImageFilter)
|
||||
|
||||
|
@ -36,18 +36,6 @@ public:
|
||||
const uint8_t tableG[256],
|
||||
const uint8_t tableB[256]);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
static SkColorFilter* Create(const uint8_t table[256]) {
|
||||
return Make(table).release();
|
||||
}
|
||||
static SkColorFilter* CreateARGB(const uint8_t tableA[256],
|
||||
const uint8_t tableR[256],
|
||||
const uint8_t tableG[256],
|
||||
const uint8_t tableB[256]) {
|
||||
return MakeARGB(tableA, tableR, tableG, tableB).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP()
|
||||
};
|
||||
|
||||
|
@ -28,12 +28,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkTileImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(const SkRect& src, const SkRect& dst, SkImageFilter* input) {
|
||||
return Make(src, dst, sk_ref_sp<SkImageFilter>(input)).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer& buffer) const override;
|
||||
|
||||
|
@ -49,30 +49,6 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
static SkImageFilter* Create(SkXfermode* mode, SkImageFilter* background,
|
||||
SkImageFilter* foreground = NULL,
|
||||
const SkImageFilter::CropRect* cropRect = NULL) {
|
||||
return Make(sk_ref_sp(mode),
|
||||
sk_ref_sp(background),
|
||||
sk_ref_sp(foreground),
|
||||
cropRect).release();
|
||||
}
|
||||
#endif
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static sk_sp<SkImageFilter> Make(sk_sp<SkXfermode> mode, SkImageFilter* background,
|
||||
SkImageFilter* foreground,
|
||||
const SkImageFilter::CropRect* cropRect) {
|
||||
return Make(std::move(mode),
|
||||
sk_ref_sp(background),
|
||||
sk_ref_sp(foreground),
|
||||
cropRect);
|
||||
}
|
||||
static sk_sp<SkImageFilter> Make(sk_sp<SkXfermode> mode, SkImageFilter* background) {
|
||||
return Make(std::move(mode), sk_ref_sp(background));
|
||||
}
|
||||
#endif
|
||||
|
||||
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();
|
||||
|
||||
private:
|
||||
|
@ -30,14 +30,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBlurImageFilterImpl)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(SkScalar sigmaX, SkScalar sigmaY, SkImageFilter* input = nullptr,
|
||||
const CropRect* cropRect = nullptr) {
|
||||
return SkImageFilter::MakeBlur(sigmaX, sigmaY, sk_ref_sp<SkImageFilter>(input),
|
||||
cropRect).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
|
||||
|
@ -21,12 +21,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLocalMatrixImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(const SkMatrix& localM, SkImageFilter* input) {
|
||||
return Make(localM, sk_sp<SkImageFilter>(SkSafeRef(input))).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void flatten(SkWriteBuffer&) const override;
|
||||
sk_sp<SkSpecialImage> onFilterImage(SkSpecialImage* source, const Context&,
|
||||
|
@ -34,14 +34,6 @@ public:
|
||||
SK_TO_STRING_OVERRIDE()
|
||||
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixImageFilter)
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_IMAGEFILTER_PTR
|
||||
static SkImageFilter* Create(const SkMatrix& transform,
|
||||
SkFilterQuality filterQuality,
|
||||
SkImageFilter* input = nullptr) {
|
||||
return Make(transform, filterQuality, sk_ref_sp<SkImageFilter>(input)).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
protected:
|
||||
SkMatrixImageFilter(const SkMatrix& transform,
|
||||
SkFilterQuality,
|
||||
|
@ -17,11 +17,6 @@ public:
|
||||
static sk_sp<SkColorFilter> Make(SkColor color, SkXfermode::Mode mode) {
|
||||
return sk_sp<SkColorFilter>(new SkModeColorFilter(color, mode));
|
||||
}
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
static SkColorFilter* Create(SkColor color, SkXfermode::Mode mode) {
|
||||
return Make(color, mode).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
SkColor getColor() const { return fColor; }
|
||||
SkXfermode::Mode getMode() const { return fMode; }
|
||||
|
@ -379,18 +379,6 @@ SET_PTR(Typeface)
|
||||
SET_PTR(Rasterizer)
|
||||
#endif
|
||||
SET_PTR(ImageFilter)
|
||||
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
|
||||
SET_PTR(Shader)
|
||||
#endif
|
||||
#ifdef SK_SUPPORT_LEGACY_COLORFILTER_PTR
|
||||
SET_PTR(ColorFilter)
|
||||
#endif
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
SkXfermode* SkPaint::setXfermode(SkXfermode* xfer) {
|
||||
this->setBlendMode(xfer ? xfer->blend() : SkBlendMode::kSrcOver);
|
||||
return this->getXfermode();
|
||||
}
|
||||
#endif
|
||||
#ifdef SK_SUPPORT_LEGACY_PATHEFFECT_PTR
|
||||
SET_PTR(PathEffect)
|
||||
#endif
|
||||
|
@ -274,30 +274,3 @@ void SkEmptyShader::toString(SkString* str) const {
|
||||
str->append(")");
|
||||
}
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
|
||||
SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode::Mode mode) {
|
||||
return MakeComposeShader(sk_ref_sp(dst), sk_ref_sp(src), mode).release();
|
||||
}
|
||||
SkShader* SkShader::CreateComposeShader(SkShader* dst, SkShader* src, SkXfermode* xfer) {
|
||||
return MakeComposeShader(sk_ref_sp(dst), sk_ref_sp(src), xfer).release();
|
||||
}
|
||||
SkShader* SkShader::CreatePictureShader(const SkPicture* src, TileMode tmx, TileMode tmy,
|
||||
const SkMatrix* localMatrix, const SkRect* tile) {
|
||||
return MakePictureShader(sk_ref_sp(const_cast<SkPicture*>(src)), tmx, tmy,
|
||||
localMatrix, tile).release();
|
||||
}
|
||||
SkShader* SkShader::newWithColorFilter(SkColorFilter* filter) const {
|
||||
return this->makeWithColorFilter(sk_ref_sp(filter)).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
#include "SkXfermode.h"
|
||||
sk_sp<SkShader> SkShader::MakeComposeShader(sk_sp<SkShader> dst, sk_sp<SkShader> src,
|
||||
SkXfermode* xfer) {
|
||||
return MakeComposeShader(std::move(dst), std::move(src), sk_ref_sp(xfer));
|
||||
}
|
||||
#endif
|
||||
|
@ -28,14 +28,6 @@ public:
|
||||
*/
|
||||
static sk_sp<SkXfermode> Make(SkScalar k1, SkScalar k2, SkScalar k3, SkScalar k4,
|
||||
bool enforcePMColor = true);
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
static SkXfermode* Create(SkScalar k1, SkScalar k2,
|
||||
SkScalar k3, SkScalar k4,
|
||||
bool enforcePMColor = true) {
|
||||
return Make(k1, k2, k3, k4, enforcePMColor).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
SK_DECLARE_FLATTENABLE_REGISTRAR_GROUP();
|
||||
|
||||
private:
|
||||
|
@ -116,13 +116,6 @@ sk_sp<SkShader> SkImage::makeShader(SkShader::TileMode tileX, SkShader::TileMode
|
||||
return SkImageShader::Make(sk_ref_sp(const_cast<SkImage*>(this)), tileX, tileY, localMatrix);
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_CREATESHADER_PTR
|
||||
SkShader* SkImage::newShader(SkShader::TileMode tileX, SkShader::TileMode tileY,
|
||||
const SkMatrix* localMatrix) const {
|
||||
return this->makeShader(tileX, tileY, localMatrix).release();
|
||||
}
|
||||
#endif
|
||||
|
||||
SkData* SkImage::encode(SkImageEncoder::Type type, int quality) const {
|
||||
SkBitmap bm;
|
||||
if (as_IB(this)->getROPixels(&bm)) {
|
||||
|
@ -312,10 +312,6 @@ DEF_TEST(Paint_MoreFlattening, r) {
|
||||
ASSERT(other.getTextSize() == paint.getTextSize());
|
||||
ASSERT(other.getLooper() == paint.getLooper());
|
||||
ASSERT(other.getBlendMode() == paint.getBlendMode());
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_XFERMODE_PTR
|
||||
other.setXfermode(nullptr);
|
||||
#endif
|
||||
}
|
||||
|
||||
DEF_TEST(Paint_getHash, r) {
|
||||
|
Loading…
Reference in New Issue
Block a user