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

Unified Diff: samplecode/SampleFilterFuzz.cpp

Issue 646213004: Adding an option to render only the shadow in SkDropShadowImageFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Added dropshadowimagefilter to ignored-tests Created 6 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 | « include/effects/SkDropShadowImageFilter.h ('k') | src/core/SkReadBuffer.h » ('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 a996a4bc27204f5dbc58c90fc828980a24362541..e073f80b0c1c16651cd2eb47d2dc0ce6aadc6582 100644
--- a/samplecode/SampleFilterFuzz.cpp
+++ b/samplecode/SampleFilterFuzz.cpp
@@ -122,6 +122,11 @@ static SkColor make_color() {
return (R(2) == 1) ? 0xFFC0F0A0 : 0xFF000090;
}
+static SkDropShadowImageFilter::ShadowMode make_shadow_mode() {
+ return (R(2) == 1) ? SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode :
+ SkDropShadowImageFilter::kDrawShadowOnly_ShadowMode;
+}
+
static SkPoint3 make_point() {
return SkPoint3(make_scalar(), make_scalar(), make_scalar(true));
}
@@ -340,8 +345,9 @@ static SkImageFilter* make_image_filter(bool canBeNull = true) {
}
break;
case DROP_SHADOW:
- filter = SkDropShadowImageFilter::Create(make_scalar(), make_scalar(),
- make_scalar(true), make_scalar(true), make_color(), make_image_filter());
+ filter = SkDropShadowImageFilter::Create(make_scalar(), make_scalar(), make_scalar(true),
+ make_scalar(true), make_color(), make_shadow_mode(), make_image_filter(),
+ NULL, 0);
break;
case MORPHOLOGY:
if (R(2) == 1) {
« no previous file with comments | « include/effects/SkDropShadowImageFilter.h ('k') | src/core/SkReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698