Bug 39297 - WebView doesn't repaint until page reloads when page using hardware acceleration loads just after waking from sleep
Summary: WebView doesn't repaint until page reloads when page using hardware accelerat...
Status: RESOLVED FIXED
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: 39295
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-18 09:35 PDT by Adam Roben (:aroben)
Modified: 2010-05-18 12:35 PDT (History)
5 users (show)

See Also:


Attachments
Make WKCACFLayerRenderer robust against temporary failure of Direct3DCreate9 and IDirect3D9::CreateDevice (8.78 KB, patch)
2010-05-18 10:14 PDT, Adam Roben (:aroben)
sullivan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>