Bug 39297

Summary: WebView doesn't repaint until page reloads when page using hardware acceleration loads just after waking from sleep
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, enrica, sfalken, simon.fraser, sullivan
Priority: P2 Keywords: InRadar, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Bug Depends on: 39295    
Bug Blocks:    
Attachments:
Description Flags
Make WKCACFLayerRenderer robust against temporary failure of Direct3DCreate9 and IDirect3D9::CreateDevice sullivan: review+

Description Adam Roben (:aroben) 2010-05-18 09:35:05 PDT
To reproduce:

1. In a build with the fix for bug 39295, go to <https://bugs.webkit.org/attachment.cgi?id=56382> (which reloads itself every 5 seconds)
2. Put the computer to sleep
3. Wake the computer up

The WebView doesn't repaint until the page reloads itself.
Comment 1 Adam Roben (:aroben) 2010-05-18 09:36:01 PDT
The problem is that calling Direct3DCreate9() shortly after waking from sleep returns an IDirect3D9 for which IDirect3D9::CreateDevice will always fail. We need to detect this and throw away the bad IDirect3D9 and ask for a new one.
Comment 2 Adam Roben (:aroben) 2010-05-18 09:36:29 PDT
<rdar://problem/7997431>
Comment 3 Adam Roben (:aroben) 2010-05-18 10:14:25 PDT
Created attachment 56386 [details]
Make WKCACFLayerRenderer robust against temporary failure of Direct3DCreate9 and IDirect3D9::CreateDevice
Comment 4 John Sullivan 2010-05-18 11:18:50 PDT
Comment on attachment 56386 [details]
Make WKCACFLayerRenderer robust against temporary failure of Direct3DCreate9 and IDirect3D9::CreateDevice

> +        so a new (and hopefully on-bad) one will be allocated later.

Typo, "on-bad"
Comment 5 Adam Roben (:aroben) 2010-05-18 11:53:25 PDT
(In reply to comment #4)
> (From update of attachment 56386 [details])
> > +        so a new (and hopefully on-bad) one will be allocated later.
> 
> Typo, "on-bad"

Whoops, that was supposed to be "non-bad". Will fix.

Thanks for the review!
Comment 6 Adam Roben (:aroben) 2010-05-18 12:35:53 PDT
Committed r59683: <http://trac.webkit.org/changeset/59683>