Summary: | REGRESSION (Margin tiles): Background gradient on dom.spec.whatwg.org is very slow to render | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||
Component: | Layout and Rendering | Assignee: | Tim Horton <thorton> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | koivisto, simon.fraser | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
URL: | http://dom.spec.whatwg.org | ||||||
Attachments: |
|
Description
Tim Horton
2014-05-27 21:01:23 PDT
Here's the story: 1. Margin tiles mean that we use drawPattern() instead of draw() for the background gradient, because it gets tiled into the margin. 2. drawPattern() paints into an ImageBuffer and uses that to do the pattern tiling. There was already code in Image::drawTiled to avoid proper ImageBuffer-backed patterned drawing and instead repeatedly call draw() in the case where the tile buffer would be very large, but it was only enabled on iOS. It seems like a pretty reasonable thing to do everywhere, so let's do that (but with a bigger limit than on iOS). 3. The ImageBuffer is the size of the gradient. The gradient on this page is the size of the document. A bitmap the size of the document is nearly 2GB here. Created attachment 232167 [details]
patch
|