New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 820909 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 644851



Sign in to add a comment

Skia doesn't support filter blur(0)

Project Member Reported by xing...@intel.com, Mar 12 2018

Issue description

The 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.
 
Skia_filter_blur0_bad.jpg
20.6 KB View Download
Skia_filter_blur0_good.jpg
25.2 KB View Download
Cc: bsalomon@chromium.org
+bsalomon@


also I am assuming the Make is called from creating BlurPaintFilter? is the input SkImageFilter in this case empty? or nullptr?

also thanks for filing this bug. :)

Comment 2 by bsalo...@google.com, Mar 12 2018

Cc: robertphillips@chromium.org

Comment 3 Deleted

Comment 4 Deleted

Comment 5 by xing...@intel.com, 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?
skia_filter_black_back.png
33.6 KB View Download

Comment 6 by xing...@intel.com, Mar 15 2018

Status: WontFix (was: Untriaged)
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