From 234f036b3e731e06e616c5291157d3bb4fbfdee2 Mon Sep 17 00:00:00 2001 From: sugoi Date: Thu, 23 Oct 2014 13:59:52 -0700 Subject: Adding an option to render only the shadow in SkDropShadowImageFilter This is basically how blink uses the filter. Currently, I can't use it for "ShadowOnly" mode with the filter at all, but instead of copying the code and risking to have the codepaths diverge, I'm simply going to add the option here. BUG=skia: Review URL: https://codereview.chromium.org/646213004 --- gm/imagefilterscropexpand.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gm/imagefilterscropexpand.cpp') diff --git a/gm/imagefilterscropexpand.cpp b/gm/imagefilterscropexpand.cpp index c9601b066c..7db41e0364 100644 --- a/gm/imagefilterscropexpand.cpp +++ b/gm/imagefilterscropexpand.cpp @@ -142,7 +142,8 @@ protected: draw(canvas, checkerboard, rect, SkDropShadowImageFilter::Create( SkIntToScalar(10), SkIntToScalar(10), SkIntToScalar(3), SkIntToScalar(3), - SK_ColorBLUE, noop_cropped.get(), &big_rect)); + SK_ColorBLUE, SkDropShadowImageFilter::kDrawShadowAndForeground_ShadowMode, + noop_cropped.get(), &big_rect, 0)); draw(canvas, checkerboard, rect, SkDisplacementMapEffect::Create( SkDisplacementMapEffect::kR_ChannelSelectorType, -- cgit v1.2.3