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

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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 | « samplecode/SampleFatBits.cpp ('k') | samplecode/SampleFuzz.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samplecode/SampleFilterFuzz.cpp
diff --git a/samplecode/SampleFilterFuzz.cpp b/samplecode/SampleFilterFuzz.cpp
index 755e8fb4587d3254f7544ca0e82c02fc17682626..28aa5f4caf3be4f452edf3cb74d8cfc201262d9a 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -157,8 +157,8 @@ static SkMatrix make_matrix() {
return m;
}
-static SkXfermode::Mode make_xfermode() {
- return static_cast<SkXfermode::Mode>(R(SkXfermode::kLastMode+1));
+static SkBlendMode make_xfermode() {
+ return static_cast<SkBlendMode>(R(SkXfermode::kLastMode+1));
}
static SkPaint::Align make_paint_align() {
@@ -508,7 +508,7 @@ static SkPaint make_paint() {
paint.setStrokeCap(make_paint_cap());
paint.setStrokeJoin(make_paint_join());
paint.setColorFilter(make_color_filter());
- paint.setXfermodeMode(make_xfermode());
+ paint.setBlendMode(make_xfermode());
paint.setPathEffect(make_path_effect());
paint.setMaskFilter(make_mask_filter());
@@ -558,7 +558,7 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) {
case MERGE:
filter = SkMergeImageFilter::Make(make_image_filter(),
make_image_filter(),
- make_xfermode());
+ (SkXfermode::Mode)make_xfermode());
break;
case COLOR: {
sk_sp<SkColorFilter> cf(make_color_filter());
@@ -585,7 +585,7 @@ static sk_sp<SkImageFilter> make_image_filter(bool canBeNull) {
make_image_filter());
break;
case XFERMODE:
- filter = SkXfermodeImageFilter::Make(SkXfermode::Make(make_xfermode()),
+ filter = SkXfermodeImageFilter::Make(make_xfermode(),
make_image_filter(),
make_image_filter(),
nullptr);
« no previous file with comments | « samplecode/SampleFatBits.cpp ('k') | samplecode/SampleFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698