Changeset 162443 in webkit


Ignore:
Timestamp:
Jan 21, 2014, 8:40:38 AM (12 years ago)
Author:
Antti Koivisto
Message:

Delay initial layer flush during loading on all platforms
https://bugs.webkit.org/show_bug.cgi?id=127347

Reviewed by Andreas Kling.

To reduce unnecessary repaints enable the same behaviour as iOS already has.

  • rendering/RenderLayerCompositor.cpp:

(WebCore::RenderLayerCompositor::RenderLayerCompositor):

Set the initial state of m_layerFlushThrottlingEnabled correctly.

(WebCore::RenderLayerCompositor::scheduleLayerFlush):
(WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded):

  • rendering/RenderLayerCompositor.h:


Enable initial layer flush delay on all platforms.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r162442 r162443  
     12014-01-21  Antti Koivisto  <antti@apple.com>
     2
     3        Delay initial layer flush during loading on all platforms
     4        https://bugs.webkit.org/show_bug.cgi?id=127347
     5
     6        Reviewed by Andreas Kling.
     7
     8        To reduce unnecessary repaints enable the same behaviour as iOS already has.
     9
     10        * rendering/RenderLayerCompositor.cpp:
     11        (WebCore::RenderLayerCompositor::RenderLayerCompositor):
     12       
     13            Set the initial state of m_layerFlushThrottlingEnabled correctly.
     14
     15        (WebCore::RenderLayerCompositor::scheduleLayerFlush):
     16        (WebCore::RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded):
     17        * rendering/RenderLayerCompositor.h:
     18       
     19            Enable initial layer flush delay on all platforms.
     20
    1212014-01-21  Mihai Tica  <mitica@adobe.com>
    222
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp

    r162117 r162443  
    4646#include "NodeList.h"
    4747#include "Page.h"
     48#include "ProgressTracker.h"
    4849#include "RenderEmbeddedObject.h"
    4950#include "RenderFlowThread.h"
     
    99100static const double throttledLayerFlushDelay = 1.5;
    100101#else
     102static const double throttledLayerFlushInitialDelay = .5;
    101103static const double throttledLayerFlushDelay = .5;
    102104#endif
     
    249251    , m_rootLayerAttachment(RootLayerUnattached)
    250252    , m_layerFlushTimer(this, &RenderLayerCompositor::layerFlushTimerFired)
    251     , m_layerFlushThrottlingEnabled(false)
     253    , m_layerFlushThrottlingEnabled(page() && page()->progress().isMainLoadProgressing())
    252254    , m_layerFlushThrottlingTemporarilyDisabledForInteraction(false)
    253255    , m_hasPendingLayerFlush(false)
     
    375377    ASSERT(!m_flushingLayers);
    376378
    377 #if PLATFORM(IOS)
    378379    if (canThrottle)
    379380        startInitialLayerFlushTimerIfNeeded();
    380 #endif
    381381
    382382    if (canThrottle && isThrottlingLayerFlushes()) {
     
    36783678}
    36793679
    3680 #if PLATFORM(IOS)
    36813680void RenderLayerCompositor::startInitialLayerFlushTimerIfNeeded()
    36823681{
     
    36873686    m_layerFlushTimer.startOneShot(throttledLayerFlushInitialDelay);
    36883687}
    3689 #endif
    36903688
    36913689void RenderLayerCompositor::layerFlushTimerFired(Timer<RenderLayerCompositor>&)
  • trunk/Source/WebCore/rendering/RenderLayerCompositor.h

    r162139 r162443  
    407407    ChromeClient* chromeClient() const;
    408408
    409     void startInitialLayerFlushTimerIfNeeded();
    410409#endif
    411410
     
    431430    void scheduleLayerFlushNow();
    432431    bool isThrottlingLayerFlushes() const;
     432    void startInitialLayerFlushTimerIfNeeded();
    433433    void startLayerFlushTimerIfNeeded();
    434434    void layerFlushTimerFired(Timer<RenderLayerCompositor>&);
Note: See TracChangeset for help on using the changeset viewer.