Bug 5526
Summary: | SVGs with filters look grainy when scaled | ||
---|---|---|---|
Product: | WebKit | Reporter: | Eric Seidel (no email) <eric> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED DUPLICATE | ||
Severity: | Normal | CC: | abarth, emacemac7, eric, ian, jeffschiller, krit, ossy, webkit.review.bot |
Priority: | P4 | Keywords: | HasReduction |
Version: | 523.x (Safari 3) | ||
Hardware: | Mac | ||
OS: | OS X 10.4 | ||
URL: | http://svg-whiz.com/svg/firefox-logo.svg | ||
Bug Depends on: | 11980, 19835, 19991 | ||
Bug Blocks: | 68469, 5579, 26389 |
Eric Seidel (no email)
SVGs with filters look grainy when scaled
Currently we apply filters according to the abstract coordinate system of the graphic, NOT the device
coordinate system (i.e. the final pixel coords when drawn to the screen). This can be *bad* for a couple
reasons.
1. When you scale the resulting pixels, the result looks grainy.
2. You can end up rendering 6 billion pixels and only using 1% of that if that part of the image is
scaled down.
A couple ways to solve this:
1. Just figure out what the final CTM for the item/group in question and render only the necessary
number of pixels.
2. (Better!) *delay* compositing of the result image. Instead pass the CIImage back to the parent
container (the one calling draw()) and let it do the compositing (or apply it's own filters using that
CIImage as an input). When you finally have to do the compositing, figure out the absolute CTM, etc.
I guess 2. is really just an optimized version of 1. In either case, this will need to be solved.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Eric Seidel (no email)
Erick said he would take a crack at this.
Dirk Schulze
If I understand your comment right, we do this right now. I scaled the feGaussianBlur and feColorMatrix of the W3C test suite and i don't see pixels. But maybe this is a result of antialiasing?
Dirk Schulze
Committed r69181: <http://trac.webkit.org/changeset/69181>
Csaba Osztrogonác
(In reply to comment #3)
> Committed r69181: <http://trac.webkit.org/changeset/69181>
It broke 2 tests on Qt bot:
http://build.webkit.org/results/Qt%20Linux%20Release/r69181%20(21569)/svg/filters/shadow-on-filter-pretty-diff.html
http://build.webkit.org/results/Qt%20Linux%20Release/r69181%20(21569)/svg/filters/shadow-on-rect-with-filter-pretty-diff.html
Dirk Schulze
Committed r69182: <http://trac.webkit.org/changeset/69182>
Dirk Schulze
Committed r69187: <http://trac.webkit.org/changeset/69187>
Dirk Schulze
This bug was fixed with the patch on bug 31370. Marking this bug as duplication of 31370 because fixes for the patch mention this bug. Sorry for that.
*** This bug has been marked as a duplicate of bug 31370 ***
WebKit Review Bot
http://trac.webkit.org/changeset/69187 might have broken GTK Linux 32-bit Debug
WebKit Review Bot
http://trac.webkit.org/changeset/69188 might have broken GTK Linux 32-bit Debug