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

Unified Diff: src/effects/SkPictureImageFilter.cpp

Issue 1893973002: Outline SkImageFilter Make methods (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 8 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/effects/SkPaintImageFilter.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkPictureImageFilter.cpp
diff --git a/src/effects/SkPictureImageFilter.cpp b/src/effects/SkPictureImageFilter.cpp
index 8e0115c345576c069bdc9fc44c77b8df8608ae12..db283c29e9a614365390b726aab9efc14582cb1c 100644
--- a/src/effects/SkPictureImageFilter.cpp
+++ b/src/effects/SkPictureImageFilter.cpp
@@ -14,6 +14,27 @@
#include "SkWriteBuffer.h"
#include "SkValidationUtils.h"
+sk_sp<SkImageFilter> SkPictureImageFilter::Make(sk_sp<SkPicture> picture) {
+ return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture)));
+}
+
+sk_sp<SkImageFilter> SkPictureImageFilter::Make(sk_sp<SkPicture> picture,
+ const SkRect& cropRect) {
+ return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture),
+ cropRect,
+ kDeviceSpace_PictureResolution,
+ kLow_SkFilterQuality));
+}
+
+sk_sp<SkImageFilter> SkPictureImageFilter::MakeForLocalSpace(sk_sp<SkPicture> picture,
+ const SkRect& cropRect,
+ SkFilterQuality filterQuality) {
+ return sk_sp<SkImageFilter>(new SkPictureImageFilter(std::move(picture),
+ cropRect,
+ kLocalSpace_PictureResolution,
+ filterQuality));
+}
+
SkPictureImageFilter::SkPictureImageFilter(sk_sp<SkPicture> picture)
: INHERITED(nullptr, 0, nullptr)
, fPicture(std::move(picture))
« no previous file with comments | « src/effects/SkPaintImageFilter.cpp ('k') | src/effects/SkTestImageFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698