Bug 5526 - SVGs with filters look grainy when scaled
Summary: SVGs with filters look grainy when scaled
Status: RESOLVED DUPLICATE of bug 31370
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P4 Normal
Assignee: Nobody
URL: http://svg-whiz.com/svg/firefox-logo.svg
Keywords: HasReduction
Depends on: 11980 19835 19991
Blocks: 68469 5579 26389
  Show dependency treegraph
Reported: 2005-10-28 00:44 PDT by Eric Seidel (no email)
Modified: 2014-05-12 05:54 PDT (History)
8 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2005-10-28 00:44:11 PDT
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 

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.
Comment 1 Eric Seidel (no email) 2005-12-06 04:57:55 PST
Erick said he would take a crack at this.
Comment 2 Dirk Schulze 2009-08-19 06:47:30 PDT
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?
Comment 3 Dirk Schulze 2010-10-06 02:46:19 PDT
Committed r69181: <http://trac.webkit.org/changeset/69181>
Comment 5 Dirk Schulze 2010-10-06 03:56:49 PDT
Committed r69182: <http://trac.webkit.org/changeset/69182>
Comment 6 Dirk Schulze 2010-10-06 05:48:20 PDT
Committed r69187: <http://trac.webkit.org/changeset/69187>
Comment 7 Dirk Schulze 2010-10-06 06:01:18 PDT
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 ***
Comment 8 WebKit Review Bot 2010-10-06 08:42:54 PDT
http://trac.webkit.org/changeset/69187 might have broken GTK Linux 32-bit Debug
Comment 9 WebKit Review Bot 2010-10-06 08:43:03 PDT
http://trac.webkit.org/changeset/69188 might have broken GTK Linux 32-bit Debug