Bug 24178

Summary: GeneratedImage::drawPattern() appears to be using more memory than necessary
Product: WebKit Reporter: mitz
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: hyatt, simon.fraser
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Description mitz 2009-02-25 16:51:20 PST
GeneratedImage::drawPattern() creates an ImageBuffer the size of a tile, then creates an Image of the same size, which results in another copy of the data being made. For large tiles (such as a gradient whose height is the height of the body element), those are very large allocations. On the CG platforms, the code can be re-worked to utilize CGPattern, with the generator being called from the pattern callback and CG managing the memory allocation. Experimentation (as part of investigating bug 24130) has shown that this results in much faster painting and reduced memory use.
Comment 1 mitz 2009-02-25 16:51:45 PST
<rdar://problem/6624024>