[Webkit-unassigned] [Bug 67729] GeneratorGeneratedImage::drawPattern does not factor in its destination context's scale when generating its image tiles

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 8 15:28:14 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=67729





--- Comment #3 from Matthew Delaney <mdelaney at apple.com>  2012-02-08 15:28:14 PST ---
The difference in rendering quality seen here when there's a border is due to how we render generated images as backgrounds.

First, regardless of what type the background image is (in this case, a Gradient as GeneratorGeneratedImage) adding a border results in the background image being drawn as a pattern with more than one tile. If there were no border, we just draw the background image as one tile and hit the normal path. However, when there's a border, we pattern draw the background image so that it shows up behind the border as well with a padding-box-sized tile as is defined in the CSS spec (whether or not the border is opaque https://bugs.webkit.org/show_bug.cgi?id=78162)

In this pattern draw case, we end up hitting GeneratorGeneratedImage's drawPattern instead of draw. Since 'draw' renders directly into the destination context - where as drawPattern renders a tile first in an ImageBuffer to then use - the generated image has the benefit of being at the resolution of the context. In the drawPattern case, the ImageBuffer that is created hasn't factored in the scale of the destination context. Thus, my patch teaches drawPattern about the scale to make tiles at a resolution that will match that of the destination context.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list