Summary: | Paint very slow when horizontally resizing (CSS gradient) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | James Robinson <jamesr> | ||||||||||
Component: | Layout and Rendering | Assignee: | Nobody <webkit-unassigned> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | farukates, hyatt, mitz, simon.fraser, zwarich | ||||||||||
Priority: | P2 | Keywords: | HasReduction, InRadar | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
URL: | http://www.apple.com/safari/features.html | ||||||||||||
Attachments: |
|
Description
James Robinson
2009-02-24 11:25:01 PST
A similar thing occurs with full-screen zoom. Created attachment 27932 [details]
Reduced testcase
The critical bits are:
*) background: -webkit-gradient
*) lots of text on a fixed-width element
*) resizing the window to smaller than the width of the text-containing element, forcing a clip.
It appears to perform worse on OS X compared to Safari 4 beta on Windows or Chromium.
Created attachment 27941 [details]
Another reduction
A smaller reduction. The border is critical.
The problem seems to happen when Image::drawTiled() chooses to call GeneratedImage::drawPattern() instead of GeneratedImage::draw(), namely when the destination rect is not contained in the tile rect. GeneratedImage::drawPattern() proceeds to allocate a potentially huge image buffer, draw into it, create an image out of it (copying the data in the process), and then use that image as a pattern. Created attachment 27996 [details]
Intersect the destination rect passed to darwTiledImage() with the dirty rect
Comment on attachment 27996 [details]
Intersect the destination rect passed to darwTiledImage() with the dirty rect
Going to add a test case
Created attachment 27997 [details]
Intersect the destination rect passed to darwTiledImage() with the dirty rect
Comment on attachment 27997 [details]
Intersect the destination rect passed to darwTiledImage() with the dirty rect
r-me
Fixed in <http://trac.webkit.org/changeset/41238>. See also bug 24178. *** Bug 24956 has been marked as a duplicate of this bug. *** |