Changeset 243866 in webkit
- Timestamp:
- Apr 4, 2019 5:51:43 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r243864 r243866 1 2019-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 1 18 2019-04-03 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
r242864 r243866 45 45 #include <wtf/text/CString.h> 46 46 47 #if USE(GLIB_EVENT_LOOP) 48 #include <wtf/glib/RunLoopSourcePriority.h> 49 #endif 50 47 51 namespace WebCore { 48 52 … … 122 126 , m_compositedNativeImagePtr(0) 123 127 , m_animationStartedTimer(*this, &CoordinatedGraphicsLayer::animationStartedTimerFired) 128 , m_requestPendingTileCreationTimer(RunLoop::main(), this, &CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired) 124 129 { 125 130 static Nicosia::PlatformLayer::LayerID nextLayerID = 1; … … 131 136 // Enforce a complete flush on the first occasion. 132 137 m_nicosia.delta.value = UINT_MAX; 138 139 #if USE(GLIB_EVENT_LOOP) 140 m_requestPendingTileCreationTimer.setPriority(RunLoopSourcePriority::LayerFlushTimer); 141 #endif 133 142 } 134 143 … … 625 634 void CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly() 626 635 { 636 // Whether it kicked or not, we don't need this timer running anymore. 637 m_requestPendingTileCreationTimer.stop(); 638 627 639 // When we have a transform animation, we need to update visible rect every frame to adjust the visible rect of a backing store. 628 640 bool hasActiveTransformAnimation = selfOrAncestorHasActiveTransformAnimation(); … … 938 950 } 939 951 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. 941 954 if (layerState.hasPendingTileCreation) { 942 955 setNeedsVisibleRectAdjustment(); 943 notifyFlushRequired();956 m_requestPendingTileCreationTimer.startOneShot(0_s); 944 957 } 945 958 … … 1184 1197 } 1185 1198 1199 void CoordinatedGraphicsLayer::requestPendingTileCreationTimerFired() 1200 { 1201 notifyFlushRequired(); 1202 } 1203 1186 1204 bool CoordinatedGraphicsLayer::usesContentsLayer() const 1187 1205 { -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
r243603 r243866 34 34 #include "TextureMapperAnimation.h" 35 35 #include "TransformationMatrix.h" 36 #include <wtf/RunLoop.h> 36 37 #include <wtf/text/StringHash.h> 37 38 … … 150 151 151 152 void animationStartedTimerFired(); 153 void requestPendingTileCreationTimerFired(); 152 154 153 155 bool filtersCanBeComposited(const FilterOperations&) const; … … 183 185 184 186 Timer m_animationStartedTimer; 187 RunLoop::Timer<CoordinatedGraphicsLayer> m_requestPendingTileCreationTimer; 185 188 TextureMapperAnimations m_animations; 186 189 MonotonicTime m_lastAnimationStartTime;
Note: See TracChangeset
for help on using the changeset viewer.