Comment #9 on issue 41756 by senor...@chromium.org: WebKit gradients
show banding on Chrome
http://code.google.com/p/chromium/issues/detail?id=41756
(No comment was entered for this change.)
Comment #12 on issue 41756 by tha...@chromium.org: WebKit gradients show
banding on Chrome
http://code.google.com/p/chromium/issues/detail?id=41756
To fix this bug, the change to SkUserConfig I landed in r71607 needs to be
reverted. This will require rebasing a bunch of tests in webkit. You also
need to check how much this affects performance; I'm attaching a simple
gradient performance benchmark. I don't know how much of a hit we're
willing to take for this, jamesr or mihaip can probably comment on this
(for reference, the benchmark gets ~24 fps on my Mac Pro, where we render
gradients using CoreGraphics).
Attachments:
animated-gradient.html 2.3 KB
If dithered rendering performance with Skia is comparable to CoreGraphics,
then enabling this seems reasonable.
Does anyone have a linux or windows box? If so, can you check how many FPS
you get in a release build in the attachment to comment 12
a) with a trunk build
b) with a trunk build that doesn't have the
SK_DISABLE_DITHER_32BIT_GRADIENT #define in skia/config/SkUserConfig.h ?
Comment #15 on issue 41756 by r...@google.com: WebKit gradients show
banding on Chrome
http://code.google.com/p/chromium/issues/detail?id=41756
skia/config/SkUserConfig.h : SK_DISABLE_DITHER_32BIT_GRADIENT
Comment #16 on issue 41756 by tha...@chromium.org: WebKit gradients show
banding on Chrome
http://code.google.com/p/chromium/issues/detail?id=41756
epoger: Fixing this requires changing a single line (see comment 12 / 15),
doing a quick perf sanity check, and then landing many webkit rebaselines.
You're probably pretty good at landing baselines at the moment; do you want
to give this a try?
Comment #17 on issue 41756 by r...@chromium.org: WebKit gradients show
banding on Chrome
http://code.google.com/p/chromium/issues/detail?id=41756
(No comment was entered for this change.)
Nico, let me make sure I understand all this:
- There is Skia code that will generate nicer (less "bandy") gradients in
http://code.google.com/p/skia/source/browse/trunk/src/effects/SkGradientShader.cpp ,
but it is disabled if SK_DISABLE_DITHER_32BIT_GRADIENT is defined.
- SK_DISABLE_DITHER_32BIT_GRADIENT is not defined within the Skia code or
build scripts, so Skia-only builds get these nicer gradients already (and
no DEPS roll is required to pick up the feature).
- Chrome *does* define SK_DISABLE_DITHER_32BIT_GRADIENT , in
http://src.chromium.org/svn/trunk/src/skia/config/SkUserConfig.h , so
Chrome is not getting the nicer gradients yet.
There are two concerns associated with removing the definition of
SK_DISABLE_DITHER_32BIT_GRADIENT from
http://src.chromium.org/svn/trunk/src/skia/config/SkUserConfig.h :
1. there may be a performance hit
2. lots of images will need to be rebaselined for all platforms that use
Skia
Have I got all that right?
Comment #21 on issue 41756 by tha...@chromium.org: WebKit gradients show
banding on Chrome
http://code.google.com/p/chromium/issues/detail?id=41756
Hi epoger, do you think you can get to this for m18?
http://tjrus.com/iphone shows more banding on mac with skia than it did
before, it would be nice if we wouldn't regress this due to the skia switch.
http://host0001.webd.pl/bugs/chrome/linear-gradient.html (from the dupe)
looks really bad: only 11 (!) steps for a gradient from white to black (see
screenshot). That's worse than just missing dithering on 8bpp/channel.
Attachments:
Screen shot 2012-01-04 at 9.38.35 PM.png 96.4 KB
Yes, multiple color-stops show up a limitation in our current impl. Will
fix asap.
Comment #29 on issue 41756 by r...@google.com: WebKit gradients show
banding on Chrome
http://code.google.com/p/chromium/issues/detail?id=41756
(No comment was entered for this change.)
Two different bugs seem to have gotten conflated here: tjrus.com/iphone and
host0001.webd.pl/bugs/chrome/linear-gradient.html are actually displaying
different issues with linear gradient.
1. A large smooth gradient across a relatively-narrow section of the color
space.
2. A large gradient with a sharp discontinuity in the middle.
I have a pending Skia patch that fixes the latter but not the former (in
both cases only for the special case of *purely vertical* linear gradients,
since the more general case costs us a 5x performance penalty). It may be
able to fix #1 as well; experimenting with that today.
Dithering would not fix #2. As far as we can determine, fixing #2 will
require a severe performance hit; we can try to write code to only incur
that performance hit if necessary, but there'll be a pretty sharp
discontinuity in quality between a gradient that activates the expensive
code path and one that doesn't.
Comment #34 on issue 41756 by tomhud...@chromium.org: WebKit gradients show
banding on Chrome
http://code.google.com/p/chromium/issues/detail?id=41756
Issue 123491 has been merged into this issue.