aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-03-30 07:32:28 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-30 07:32:28 -0700
commit372177ee115d46dfb5bfb881a408e6c37ae83678 (patch)
tree674a01098b007017b989cf8d350398a0c794a345 /src/effects
parent2e77ddbb5e7274a83724ceaa5680f367e54163d4 (diff)
Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp
Diffstat (limited to 'src/effects')
-rw-r--r--src/effects/SkPaintImageFilter.cpp11
-rw-r--r--src/effects/SkPictureImageFilter.cpp4
2 files changed, 6 insertions, 9 deletions
diff --git a/src/effects/SkPaintImageFilter.cpp b/src/effects/SkPaintImageFilter.cpp
index 7056f26863..cbd793a692 100644
--- a/src/effects/SkPaintImageFilter.cpp
+++ b/src/effects/SkPaintImageFilter.cpp
@@ -12,20 +12,16 @@
#include "SkSpecialSurface.h"
#include "SkWriteBuffer.h"
-SkImageFilter* SkPaintImageFilter::Create(const SkPaint& paint, const CropRect* cropRect) {
- return new SkPaintImageFilter(paint, cropRect);
-}
-
SkPaintImageFilter::SkPaintImageFilter(const SkPaint& paint, const CropRect* cropRect)
- : INHERITED(0, nullptr, cropRect)
- , fPaint(paint) {
+ : INHERITED(nullptr, 0, cropRect)
+ , fPaint(paint) {
}
SkFlattenable* SkPaintImageFilter::CreateProc(SkReadBuffer& buffer) {
SK_IMAGEFILTER_UNFLATTEN_COMMON(common, 0);
SkPaint paint;
buffer.readPaint(&paint);
- return Create(paint, &common.cropRect());
+ return SkPaintImageFilter::Make(paint, &common.cropRect()).release();
}
void SkPaintImageFilter::flatten(SkWriteBuffer& buffer) const {
@@ -80,6 +76,7 @@ bool SkPaintImageFilter::canComputeFastBounds() const {
#ifndef SK_IGNORE_TO_STRING
void SkPaintImageFilter::toString(SkString* str) const {
str->appendf("SkPaintImageFilter: (");
+ fPaint.toString(str);
str->append(")");
}
#endif
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index f5e3d4680b..2005463bd4 100644
--- a/src/effects/SkPictureImageFilter.cpp
+++ b/src/effects/SkPictureImageFilter.cpp
@@ -14,7 +14,7 @@
#include "SkValidationUtils.h"
SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture)
- : INHERITED(0, 0, nullptr)
+ : INHERITED(nullptr, 0, nullptr)
, fPicture(std::move(picture))
, fCropRect(fPicture ? fPicture->cullRect() : SkRect::MakeEmpty())
, fPictureResolution(kDeviceSpace_PictureResolution)
@@ -24,7 +24,7 @@ SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture)
SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture, const SkRect& cropRect,
PictureResolution pictureResolution,
SkFilterQuality filterQuality)
- : INHERITED(0, 0, nullptr)
+ : INHERITED(nullptr, 0, nullptr)
, fPicture(std::move(picture))
, fCropRect(cropRect)
, fPictureResolution(pictureResolution)