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

Unified Diff: gm/xfermodeimagefilter.cpp

Issue 204543006: New option for arithmetic mode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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 | « no previous file | gyp/effects.gypi » ('j') | include/effects/SkValidateImageFilter.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/xfermodeimagefilter.cpp
diff --git a/gm/xfermodeimagefilter.cpp b/gm/xfermodeimagefilter.cpp
index 2b14f4dfaab25d062e58881c72bf41d20218094a..e342a5e3845f220af96a1b006a03e1895bd6362b 100644
--- a/gm/xfermodeimagefilter.cpp
+++ b/gm/xfermodeimagefilter.cpp
@@ -8,6 +8,7 @@
#include "gm.h"
#include "SkArithmeticMode.h"
#include "SkOffsetImageFilter.h"
+#include "SkValidateImageFilter.h"
#include "SkXfermodeImageFilter.h"
#include "SkBitmapSource.h"
@@ -143,8 +144,9 @@ protected:
}
}
// Test arithmetic mode as image filter
- SkAutoTUnref<SkXfermode> mode(SkArithmeticMode::Create(0, SK_Scalar1, SK_Scalar1, 0));
- SkAutoTUnref<SkImageFilter> filter(SkXfermodeImageFilter::Create(mode, background));
+ SkAutoTUnref<SkXfermode> mode(SkArithmeticMode::Create(0, SK_Scalar1, SK_Scalar1, 0, false));
+ SkAutoTUnref<SkImageFilter> xferFilter(SkXfermodeImageFilter::Create(mode, background));
+ SkAutoTUnref<SkImageFilter> filter(SkValidateImageFilter::Create(xferFilter));
paint.setImageFilter(filter);
drawClippedBitmap(canvas, fBitmap, paint, x, y);
x += fBitmap.width() + MARGIN;
« no previous file with comments | « no previous file | gyp/effects.gypi » ('j') | include/effects/SkValidateImageFilter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698