Bug 34034

Summary: Race condition in video setup can force videos into software mode
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: MediaAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch eric.carlson: review+

Description Simon Fraser (smfr) 2010-01-22 21:04:47 PST
Sometimes video elements can go into software mode, if the the cursor happens to be over the video element around page load time.

The issue is that when the mouse is over the content area, we do an eager layout, which in turn updates compositing layers. RenderLayerCompositor::updateBacking() calls video->acceleratedRenderingStateChanged(), but before any data has loaded, so all the videos start in software mode. Once in softare mode, they don't get pushed into hardware mode later.
Comment 1 Simon Fraser (smfr) 2010-01-22 21:05:09 PST
<rdar://problem/7524278>
Comment 2 Simon Fraser (smfr) 2010-01-22 21:29:26 PST
Created attachment 47264 [details]
Patch
Comment 3 Eric Carlson 2010-01-22 22:01:20 PST
Comment on attachment 47264 [details]
Patch

While not new to this patch, I think there is still have a problem if mediaPlayerGraphicsLayer() ever returns NULL. The rendering mode will be set to MediaRenderingMovieLayer, but the QTMovieLayer won't get attached until the rendering state changes.

r=me
Comment 4 Simon Fraser (smfr) 2010-01-22 22:02:41 PST
I filed bug 34036 to address that problem.
Comment 5 Simon Fraser (smfr) 2010-01-23 08:09:11 PST
http://trac.webkit.org/changeset/53768