Skia doesn't support filter blur(0) |
|||
Issue descriptionThe drawing area of blur(0) is left blank(Skia_filter_blur0_bad.jpg) Test case: LayoutTests/css3/filters/effect-blur-hw.html My investigation: In SkBlurImageFilter::Make, if the sigma of blur is smaller than (SK_Scalar1 / (1 << 12)). It will return the input SkImageFilter. If comment out this early out, blur(0) will be draw correctly, but there is a high frequency black background when chromium is launched on Ubuntu.
,
Mar 12 2018
,
Mar 14 2018
Yes, SkBlurImageFilter::Make is called from BlurPaintFilter. The input SkImageFilter is nullptr. What confuses me is, for GLRenderer, the SkBlurImageFilter::Make also passed in zero sigma, and it works well. And I have one interesting founding: with my filter cl, if change sigma of blur in css to different value, the black background may not happen or happen very frequently. I collected some data below(zero for normal background, 1 for black background. Every blur sigma was tested 15 times): blur(1px): 000000000000000 (No black back) blur(0.9px): 000000000000000 (No black back) blur(0.5px): 000000000000000 (No black back) blur(0.4px): 000000000000000 (No black back) blur(0.3px): 000000000000000 (No black back) blur(0.28px): 000000000000000 (No black back) blur(0.27px): 000000000000000 (No black back) blur(0.26px): 000000000000000 (No black back) blur(0.255px): 000000001000101 blur(0.25px): 110001010101001 blur(0.2px): 101000101010001 blur(0.1px): 100000000101000 blur(0.01px): 110110100111111 blur(0.00025px): 001000110110110 blur(0.00024px): 000000000000000 (No black back, and no original image) blur(0): 000000000000000 (No black back, and no original image) Does it possible some float related problem?
,
Mar 15 2018
I found the solution for this is draw it directly. So mark this as WontF'x/Invalid. Sorry for the noise. |
|||
►
Sign in to add a comment |
|||
Comment 1 by weiliangc@chromium.org
, Mar 12 2018