W3C home > Mailing lists > Public > www-style@w3.org > July 2010

Re: [css3-background] Where we are with Blur value discussion

From: Brad Kemper <brad.kemper@gmail.com>
Date: Thu, 22 Jul 2010 23:04:50 -0700
Cc: Aryeh Gregor <Simetrical+w3c@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, Simon Fraser <smfr@me.com>, Brendan Kenny <bckenny@gmail.com>, www-style list <www-style@w3.org>
Message-Id: <6AD049A4-EDF6-4B2A-B093-35287C5AE1E4@gmail.com>
To: Tab Atkins Jr. <jackalmage@gmail.com>

On Jul 20, 2010, at 5:47 PM, Tab Atkins Jr. wrote:

> On Mon, Jul 19, 2010 at 3:53 PM, Aryeh Gregor <Simetrical+w3c@gmail.com> wrote:
>> Then it will look different between different browsers.  We should try
>> to not write specs that allow this unless there's a specific good
>> reason, like respecting platform conventions or limiting optimization
>> opportunities.  If browsers use entirely different blur algorithms,
>> then they will diverge a lot in edge cases at the very least, and
>> that's not interoperable.  Mandating that browsers should use one
>> particular *pixel-specific* blur algorithm (or close approximations
>> thereto) is the correct thing to do, if implementers are okay with it
>> -- which isn't clear to me at this point.
> I'm digging in deeper with our Skia devs to see what the precise
> reasoning was behind using what appears to be a single box-blur.  As I
> said before, I think it was for performance reasons, but I'm trying to
> get an answer from the horse's mouth before I come down hard on one
> side of the issue or another.
> If it turns out that the performance savings of Skia blurs really
> aren't that important, and that it would be fine to just change our
> impl to do a triple box-blur like I think everyone else does, then we
> can define the conformance criteria as each pixel having to be within
> X% of a gaussian blur with stdev equal to half the blur length.  (X%
> being probably 3% or 5%.)  That'd pass everyone who's doing pretty
> blurs right now, and pass Chrome on all platforms once we change Skia
> to be prettier.

I'm not sure what you are saying about the 3-5%. Are you saying that the width of the outer portion of the blur can be within 3-5% of what the author specified? If so, I'd rather the numbers that were used as the stdev were jiggered 3-5% in order to have a more mundanely predictably blur width.

On the other hand, I am not seeing a outer-half blur width that is anywhere near the distance I specify with larger numbers. For instance, I just tried the following, in which I specified a 200px blur in Firefox:

<div style="background-color:Red; height:300px; width:300px; -moz-box-shadow:450px 450px 200px black; margin-top:-150px; margin-left:-150px; "> </div>

But instead of extending the shadow out by about 200px in each direction, it actually extended it out 151px on each of the horizontal sides, and 161px on each of the vertical sides. That's pretty weird. When I measured the values along the bottom of the blur, the bottom 10 rows of blur pixels (along the straight segment) were all the same (254, 254, 254), and the bottom 21 rows were 99% brightness. Maybe there were 40 or 50 more pixels outside of all that which is less than 1/256th opacity?
Received on Friday, 23 July 2010 06:05:26 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:37 UTC