Bug 37928

Summary: WebView can modify its backing store bitmap while CoreAnimation is using it, which can cause rendering artifacts
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: aestes, cmarrin, darin, sfalken
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   

Adam Roben (:aroben)
Reported 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.
Attachments
Adam Roben (:aroben)
Comment 1 2010-04-21 08:42:23 PDT
Note You need to log in before you can comment on or make changes to this bug.