Bug 135018 - Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
Summary: Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Tim Horton
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-07-17 12:05 PDT by Tim Horton
Modified: 2014-07-19 23:08 PDT (History)
5 users (show)

See Also:


Attachments
patch (7.76 KB, patch)
2014-07-17 12:10 PDT, Tim Horton
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2014-07-17 12:05:14 PDT
Empty tiles show up as black.

To combat this, we'll make sure we immediately dispatch view state changes *from inside the resume notification* so that the UI process is blocked *before* removing the snapshot.

We'll also temporarily detach the RemoteLayerTreeHost root layer (it'll get reattached on the next commit) so that even if our waitForDidUpdateViewState times out (500 ms), we'll show white instead of black.

We could also make said timeout longer in the resume case, but that will be a different patch.

<rdar://problem/17615038>
Comment 1 Tim Horton 2014-07-17 12:10:24 PDT
Created attachment 235082 [details]
patch
Comment 2 Tim Horton 2014-07-17 12:20:18 PDT
http://trac.webkit.org/changeset/171191
Comment 3 Darin Adler 2014-07-19 23:08:10 PDT
Comment on attachment 235082 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=235082&action=review

> Source/WebKit2/UIProcess/DrawingAreaProxy.h:91
> +    virtual void hideContentUntilNextUpdate() { ASSERT_NOT_REACHED(); }

Doesn’t seem right.

If WKContentView knows that its drawing area is a RemoteLayerTreeDrawingAreaProxy, then it could be written to do a safe downcast and this function could be in that class instead of here in this base class.

If WKContentView doesn’t know that its drawing area is a RemoteLayerTreeDrawingAreaProxy, then we can’t ASSERT_NOT_REACHED.