Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(965)

Unified Diff: src/effects/SkPaintImageFilter.cpp

Issue 1842793002: Switch SkLocalMatrixImageFilter and SkPaintImageFilter over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Ooops Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkLocalMatrixImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPaintImageFilter.cpp
diff --git a/src/effects/SkPaintImageFilter.cpp b/src/effects/SkPaintImageFilter.cpp
index 7056f26863fcba0cd2bb9ca85db03800a5df42db..cbd793a692685852d789e243fafae6f0ef1cf807 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
« no previous file with comments | « src/core/SkLocalMatrixImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698