Bug 90401 - Compositing layer sync should cause deferred repaints to be fired immediately
Summary: Compositing layer sync should cause deferred repaints to be fired immediately
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-07-02 14:19 PDT by Tim Horton
Modified: 2012-07-02 15:15 PDT (History)
3 users (show)

See Also:


Attachments
patch (2.80 KB, patch)
2012-07-02 14:30 PDT, Tim Horton
koivisto: review+
simon.fraser: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Horton 2012-07-02 14:19:54 PDT
When we sync compositing layer state, we need to paint immediately, no matter what; otherwise we might see a visible flash before painting occurs.
Comment 1 Radar WebKit Bug Importer 2012-07-02 14:20:32 PDT
<rdar://problem/11792028>
Comment 2 Tim Horton 2012-07-02 14:30:09 PDT
Created attachment 150475 [details]
patch
Comment 3 Simon Fraser (smfr) 2012-07-02 14:51:42 PDT
Comment on attachment 150475 [details]
patch

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

> Source/WebCore/page/FrameView.cpp:752
>      root->compositor()->flushPendingLayerChanges(rootFrameForSync == m_frame);
>  
> +    // If we sync compositing layers and allow the repaint to be deferred, there is time for a
> +    // visible flash to occur. Instead, stop the deferred repaint timer and repaint immediately.
> +    stopDelayingDeferredRepaints();

I think we should swap these around.

If deferred repaints at some point affects compositing layers (it does not yet), then we'd want those repaints to get flushed.
Comment 4 Antti Koivisto 2012-07-02 15:00:44 PDT
Comment on attachment 150475 [details]
patch

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

> Source/WebCore/page/FrameView.cpp:1948
> +    if (!m_deferredRepaintTimer.isActive())
> +        return;
> +
>      m_deferredRepaintTimer.stop();

This does not make any sense.
Comment 5 Antti Koivisto 2012-07-02 15:03:07 PDT
Comment on attachment 150475 [details]
patch

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

>> Source/WebCore/page/FrameView.cpp:1948
>>      m_deferredRepaintTimer.stop();
> 
> This does not make any sense.

Actually it does, I misread!
Comment 6 Tim Horton 2012-07-02 15:15:23 PDT
http://trac.webkit.org/changeset/121708