Bug 52701

Summary: Refcount Images used in rendering code
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, ap, eric, hyatt, pkasting, simon.fraser
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 51845    
Attachments:
Description Flags
Patch eric: review+

Simon Fraser (smfr)
Reported 2011-01-18 22:41:17 PST
We can't always assume that Images returned by StyleImage::image(RenderObject*, const IntSize&) will be kept alive by StyleImage or the CSSValue code. For example, for CSS gradients, we may need to create a new, uncached Image each time (see bug 51845). For this reason we need to ref-count these Images which are passed back to rendering code.
Attachments
Patch (24.49 KB, patch)
2011-01-18 23:04 PST, Simon Fraser (smfr)
eric: review+
Simon Fraser (smfr)
Comment 1 2011-01-18 23:04:26 PST
Eric Seidel (no email)
Comment 2 2011-01-24 15:37:17 PST
Comment on attachment 79392 [details] Patch Looks sane. It's always saddened me that on most platforms Image is double-refcounted, because the buffer behind the Image itself is often ref-counted.
Eric Seidel (no email)
Comment 3 2011-01-24 15:38:16 PST
ap was fixing style-ownership issues recently and might be curious to see this go by.
Simon Fraser (smfr)
Comment 4 2011-01-24 21:53:18 PST
Note You need to log in before you can comment on or make changes to this bug.