⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 243998 in webkit


Ignore:
Timestamp:
Apr 8, 2019, 3:44:51 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

Merge r243866 - [GTK][WPE] Use a timer to request the creation of pending tiles
https://bugs.webkit.org/show_bug.cgi?id=196594

Reviewed by Žan Doberšek.

Use a timer to request pending tile creation, as calls to notifyFlushRequired() are discarded
while inside a layer flush.

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:

(WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
(WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
(WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
(WebCore::CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired):

  • platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
Location:
releases/WebKitGTK/webkit-2.24/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r243994 r243998  
     12019-04-04  Miguel Gomez  <magomez@igalia.com>
     2
     3        [GTK][WPE] Use a timer to request the creation of pending tiles
     4        https://bugs.webkit.org/show_bug.cgi?id=196594
     5
     6        Reviewed by Žan Doberšek.
     7
     8        Use a timer to request pending tile creation, as calls to notifyFlushRequired() are discarded
     9        while inside a layer flush.
     10
     11        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
     12        (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
     13        (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
     14        (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
     15        (WebCore::CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired):
     16        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
     17
    1182019-04-05  Sergio Villar Senin  <svillar@igalia.com>
    219
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp

    r243981 r243998  
    4545#include <wtf/text/CString.h>
    4646
     47#if USE(GLIB_EVENT_LOOP)
     48#include <wtf/glib/RunLoopSourcePriority.h>
     49#endif
     50
    4751namespace WebCore {
    4852
     
    122126    , m_compositedNativeImagePtr(0)
    123127    , m_animationStartedTimer(*this, &CoordinatedGraphicsLayer::animationStartedTimerFired)
     128    , m_requestPendingTileCreationTimer(RunLoop::main(), this, &CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired)
    124129{
    125130    static Nicosia::PlatformLayer::LayerID nextLayerID = 1;
     
    131136    // Enforce a complete flush on the first occasion.
    132137    m_nicosia.delta.value = UINT_MAX;
     138
     139#if USE(GLIB_EVENT_LOOP)
     140    m_requestPendingTileCreationTimer.setPriority(RunLoopSourcePriority::LayerFlushTimer);
     141#endif
    133142}
    134143
     
    625634void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly()
    626635{
     636    // Whether it kicked or not, we don't need this timer running anymore.
     637    m_requestPendingTileCreationTimer.stop();
     638
    627639    // When we have a transform animation, we need to update visible rect every frame to adjust the visible rect of a backing store.
    628640    bool hasActiveTransformAnimation = selfOrAncestorHasActiveTransformAnimation();
     
    938950    }
    939951
    940     // Request a second update immediately if some tiles are still pending creation.
     952    // Request a new update immediately if some tiles are still pending creation. Do this on a timer
     953    // as we're in a layer flush and flush requests at this point would be discarded.
    941954    if (layerState.hasPendingTileCreation) {
    942955        setNeedsVisibleRectAdjustment();
    943         notifyFlushRequired();
     956        m_requestPendingTileCreationTimer.startOneShot(0_s);
    944957    }
    945958
     
    11841197}
    11851198
     1199void CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired()
     1200{
     1201    notifyFlushRequired();
     1202}
     1203
    11861204bool CoordinatedGraphicsLayer::usesContentsLayer() const
    11871205{
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h

    r236016 r243998  
    3434#include "TextureMapperAnimation.h"
    3535#include "TransformationMatrix.h"
     36#include <wtf/RunLoop.h>
    3637#include <wtf/text/StringHash.h>
    3738
     
    150151
    151152    void animationStartedTimerFired();
     153    void requestPendingTileCreationTimerFired();
    152154
    153155    bool filtersCanBeComposited(const FilterOperations&) const;
     
    184186
    185187    Timer m_animationStartedTimer;
     188    RunLoop::Timer<CoordinatedGraphicsLayer> m_requestPendingTileCreationTimer;
    186189    TextureMapperAnimations m_animations;
    187190    MonotonicTime m_lastAnimationStartTime;
Note: See TracChangeset for help on using the changeset viewer.