Bug 124872

Summary: Remote Layer Tree: Hook up setLayerTreeStateIsFrozen
Product: WebKit Reporter: Tim Horton <thorton>
Component: WebKit2Assignee: Tim Horton <thorton>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, sam, simon.fraser, webkit-bug-importer
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch bfulgham: review+

Description Tim Horton 2013-11-25 17:12:51 PST
To make printing not kill the main page.

We can just keep deferring the flush until we get unfrozen; all of the property changes will just keep accumulating.
Comment 1 Tim Horton 2013-11-25 17:14:58 PST
Created attachment 217849 [details]
patch
Comment 2 Brent Fulgham 2013-11-26 19:18:45 PST
Comment on attachment 217849 [details]
patch

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

r=me. But please consider whether the "optimization" or "flush avoidance" I suggested makes any sense.

> Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:145
> +    if (!m_isFlushingSuspended && m_hasDeferredFlush) {

Should we bother checking if our original state was already "!m_isFlushingSuspended" and only schedule the layer flush for the case where state is changing?

I.e.:

if (m_isFlushingSuspended == isFrozen)
    return;

... before doing the rest of your code?
Comment 3 Tim Horton 2013-12-02 12:55:38 PST
http://trac.webkit.org/changeset/159956