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

Unified Diff: src/effects/SkMergeImageFilter.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/SkImageSource.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkMergeImageFilter.cpp
diff --git a/src/effects/SkMergeImageFilter.cpp b/src/effects/SkMergeImageFilter.cpp
index 44e6caf087e90fc8f074d0cbf55affe0b7e65ea9..2dd02ee529ce283b7ecf16a0963b57d106a141ea 100755
--- a/src/effects/SkMergeImageFilter.cpp
+++ b/src/effects/SkMergeImageFilter.cpp
@@ -14,6 +14,22 @@
#include "SkWriteBuffer.h"
#include "SkValidationUtils.h"
+sk_sp<SkImageFilter> SkMergeImageFilter::Make(sk_sp<SkImageFilter> first,
+ sk_sp<SkImageFilter> second,
+ SkXfermode::Mode mode,
+ const CropRect* cropRect) {
+ sk_sp<SkImageFilter> inputs[2] = { first, second };
+ SkXfermode::Mode modes[2] = { mode, mode };
+ return sk_sp<SkImageFilter>(new SkMergeImageFilter(inputs, 2, modes, cropRect));
+}
+
+sk_sp<SkImageFilter> SkMergeImageFilter::Make(sk_sp<SkImageFilter> filters[],
+ int count,
+ const SkXfermode::Mode modes[],
+ const CropRect* cropRect) {
+ return sk_sp<SkImageFilter>(new SkMergeImageFilter(filters, count, modes, cropRect));
+}
+
///////////////////////////////////////////////////////////////////////////////
void SkMergeImageFilter::initAllocModes() {
« no previous file with comments | « src/effects/SkImageSource.cpp ('k') | src/effects/SkMorphologyImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698