Bug 58256

Summary: Ignore context change callbacks when not on the main thread
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: Layout and RenderingAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: Windows 7   
Attachments:
Description Flags
Proposed patch simon.fraser: review+

Eric Carlson
Reported 2011-04-11 12:16:00 PDT
WKQCA::CAView::contextDidChangeCallback should do nothing when called on a background thread because it triggers WebCore rendering.
Attachments
Proposed patch (1.48 KB, patch)
2011-04-11 12:26 PDT, Eric Carlson
simon.fraser: review+
Eric Carlson
Comment 1 2011-04-11 12:26:00 PDT
Created attachment 89051 [details] Proposed patch
Adam Roben (:aroben)
Comment 2 2011-04-11 13:22:23 PDT
It would be nice to have a little more information in the bug and ChangeLog about when this could happen and why it's OK to ignore the callback in that case.
Eric Carlson
Comment 3 2011-04-11 14:11:22 PDT
It is safe to ignore the contextDidChangeCallback callback from background threads because in that case no changes have actually been committed to the context, so there is no chance animations will have started, etc.
Adam Roben (:aroben)
Comment 4 2011-04-11 14:14:26 PDT
Thanks, Eric. To be even more specific, IIRC, we expect to receive this notification on a background thread due to a CAImageQueue being modified. But in that case, as Eric said, there are no real changes to the context; we just need to render again (which WKCACFView will take care of on its own).
Adam Roben (:aroben)
Comment 5 2011-04-11 14:15:35 PDT
Eric, I think WebKit2 needs the same fix applied in LayerTreeHostCAWin.
Eric Carlson
Comment 6 2011-04-11 14:38:33 PDT
Eric Carlson
Comment 7 2011-04-11 15:03:26 PDT
Note You need to log in before you can comment on or make changes to this bug.