Bug 37928 - WebView can modify its backing store bitmap while CoreAnimation is using it, which can cause rendering artifacts
Summary: WebView can modify its backing store bitmap while CoreAnimation is using it, ...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2010-04-21 08:41 PDT by Adam Roben (:aroben)
Modified: 2010-04-21 08:42 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2010-04-21 08:41:51 PDT
Right now, when using accelerated compositing, WebView renders in its normal fashion (by drawing into its m_backingStoreBitmap), then we send the new bits to CA by wrapping the bitmap in a CGImageRef and calling CACFLayerSetContents. But WebView might modify the bits of m_backingStoreBitmap while CA is still using that CGImageRef, which can result in rendering artifacts (e.g., partial updates, depending on when the bits get copied from the CGImageRef to the GPU).

If we instead were to call CACFLayerSetNeedsDisplay whenever the WebView needs to render, and then render into the CGContextRef that CA gives us in the display callback for the root layer, I think we wouldn't be in danger of modifying the bits while CA is using them. Basically we'd switch from rendering into m_backingStoreBitmap to rendering into a CA-provided CGContextRef.
Comment 1 Adam Roben (:aroben) 2010-04-21 08:42:23 PDT
<rdar://problem/7888659>