Title: [268049] trunk/Source
Revision
268049
Author
simon.fra...@apple.com
Date
2020-10-06 08:27:50 -0700 (Tue, 06 Oct 2020)

Log Message

Rename scheduleTimedRenderingUpdate() to scheduleRenderingUpdate() everywhere
https://bugs.webkit.org/show_bug.cgi?id=217367

Reviewed by Alex Christensen.

The previously named scheduleImmediateRenderingUpdate() is no more, so all rendering
updates that WebCore knows about are of the timed variety. So just call them
scheduleRenderingUpdate() everywhere.

Source/WebCore:

* animation/DocumentTimeline.cpp:
(WebCore::DocumentTimeline::scheduleAnimationResolution):
* dom/Document.cpp:
(WebCore::Document::setNeedsDOMWindowResizeEvent):
(WebCore::Document::setNeedsVisualViewportResize):
(WebCore::Document::addPendingScrollEventTarget):
(WebCore::Document::setNeedsVisualViewportScrollEvent):
(WebCore::Document::scheduleRenderingUpdate):
(WebCore::Document::scheduleInitialIntersectionObservationUpdate):
(WebCore::Document::updateResizeObservations):
(WebCore::Document::scheduleTimedRenderingUpdate): Deleted.
* dom/Document.h:
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::scheduleAnimation):
* page/ChromeClient.h:
(WebCore::ChromeClient::scheduleRenderingUpdate):
(WebCore::ChromeClient::scheduleTimedRenderingUpdate): Deleted.
* page/Page.cpp:
(WebCore::Page::updateStyleAfterChangeInEnvironment):
(WebCore::Page::scheduleRenderingUpdate):
(WebCore::Page::accessibilitySettingsDidChange):
(WebCore::Page::appearanceDidChange):
(WebCore::Page::scheduleTimedRenderingUpdate): Deleted.
* page/Page.h:
* page/PageOverlayController.cpp:
(WebCore::PageOverlayController::didChangeViewExposedRect):
(WebCore::PageOverlayController::notifyFlushRequired):
* page/RenderingUpdateScheduler.cpp:
(WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency):
(WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
(WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate): Deleted.
* page/RenderingUpdateScheduler.h:
* page/ResizeObserver.cpp:
(WebCore::ResizeObserver::observe):
* page/linux/ResourceUsageOverlayLinux.cpp:
* page/mac/ServicesOverlayController.mm:
(WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::scheduleRenderingUpdateForImage):
* svg/graphics/SVGImageClients.h:

Source/WebKit:

* WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp:
(WebKit::LayerTreeHost::layerFlushTimerFired):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (268048 => 268049)


--- trunk/Source/WebCore/ChangeLog	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/ChangeLog	2020-10-06 15:27:50 UTC (rev 268049)
@@ -1,3 +1,55 @@
+2020-10-06  Simon Fraser  <simon.fra...@apple.com>
+
+        Rename scheduleTimedRenderingUpdate() to scheduleRenderingUpdate() everywhere
+        https://bugs.webkit.org/show_bug.cgi?id=217367
+
+        Reviewed by Alex Christensen.
+
+        The previously named scheduleImmediateRenderingUpdate() is no more, so all rendering
+        updates that WebCore knows about are of the timed variety. So just call them 
+        scheduleRenderingUpdate() everywhere.
+
+        * animation/DocumentTimeline.cpp:
+        (WebCore::DocumentTimeline::scheduleAnimationResolution):
+        * dom/Document.cpp:
+        (WebCore::Document::setNeedsDOMWindowResizeEvent):
+        (WebCore::Document::setNeedsVisualViewportResize):
+        (WebCore::Document::addPendingScrollEventTarget):
+        (WebCore::Document::setNeedsVisualViewportScrollEvent):
+        (WebCore::Document::scheduleRenderingUpdate):
+        (WebCore::Document::scheduleInitialIntersectionObservationUpdate):
+        (WebCore::Document::updateResizeObservations):
+        (WebCore::Document::scheduleTimedRenderingUpdate): Deleted.
+        * dom/Document.h:
+        * dom/ScriptedAnimationController.cpp:
+        (WebCore::ScriptedAnimationController::scheduleAnimation):
+        * page/ChromeClient.h:
+        (WebCore::ChromeClient::scheduleRenderingUpdate):
+        (WebCore::ChromeClient::scheduleTimedRenderingUpdate): Deleted.
+        * page/Page.cpp:
+        (WebCore::Page::updateStyleAfterChangeInEnvironment):
+        (WebCore::Page::scheduleRenderingUpdate):
+        (WebCore::Page::accessibilitySettingsDidChange):
+        (WebCore::Page::appearanceDidChange):
+        (WebCore::Page::scheduleTimedRenderingUpdate): Deleted.
+        * page/Page.h:
+        * page/PageOverlayController.cpp:
+        (WebCore::PageOverlayController::didChangeViewExposedRect):
+        (WebCore::PageOverlayController::notifyFlushRequired):
+        * page/RenderingUpdateScheduler.cpp:
+        (WebCore::RenderingUpdateScheduler::adjustRenderingUpdateFrequency):
+        (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate):
+        (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate): Deleted.
+        * page/RenderingUpdateScheduler.h:
+        * page/ResizeObserver.cpp:
+        (WebCore::ResizeObserver::observe):
+        * page/linux/ResourceUsageOverlayLinux.cpp:
+        * page/mac/ServicesOverlayController.mm:
+        (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired):
+        * rendering/RenderElement.cpp:
+        (WebCore::RenderElement::scheduleRenderingUpdateForImage):
+        * svg/graphics/SVGImageClients.h:
+
 2020-10-06  Youenn Fablet  <you...@apple.com>
 
         In case all tracks are ended, enqueue a task to stop recording instead of stopping recording

Modified: trunk/Source/WebCore/animation/DocumentTimeline.cpp (268048 => 268049)


--- trunk/Source/WebCore/animation/DocumentTimeline.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/animation/DocumentTimeline.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -166,7 +166,7 @@
     if (!shouldRunUpdateAnimationsAndSendEventsIgnoringSuspensionState())
         return;
 
-    m_document->page()->scheduleTimedRenderingUpdate();
+    m_document->page()->scheduleRenderingUpdate();
     m_animationResolutionScheduled = true;
 }
 

Modified: trunk/Source/WebCore/dom/Document.cpp (268048 => 268049)


--- trunk/Source/WebCore/dom/Document.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/dom/Document.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -560,7 +560,7 @@
     , m_fullscreenManager { makeUniqueRef<FullscreenManager>(*this) }
 #endif
 #if ENABLE(INTERSECTION_OBSERVER)
-    , m_intersectionObserversInitialUpdateTimer(*this, &Document::scheduleTimedRenderingUpdate)
+    , m_intersectionObserversInitialUpdateTimer(*this, &Document::scheduleRenderingUpdate)
 #endif
     , m_loadEventDelayTimer(*this, &Document::loadEventDelayTimerFired)
 #if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION)
@@ -4077,13 +4077,13 @@
 void Document::setNeedsDOMWindowResizeEvent()
 {
     m_needsDOMWindowResizeEvent = true;
-    scheduleTimedRenderingUpdate();
+    scheduleRenderingUpdate();
 }
 
 void Document::setNeedsVisualViewportResize()
 {
     m_needsVisualViewportResizeEvent = true;
-    scheduleTimedRenderingUpdate();
+    scheduleRenderingUpdate();
 }
 
 // https://drafts.csswg.org/cssom-view/#run-the-resize-steps
@@ -4113,7 +4113,7 @@
         return;
 
     if (targets.isEmpty())
-        scheduleTimedRenderingUpdate();
+        scheduleRenderingUpdate();
 
     targets.append(target);
 }
@@ -4121,7 +4121,7 @@
 void Document::setNeedsVisualViewportScrollEvent()
 {
     if (!m_needsVisualViewportScrollEvent)
-        scheduleTimedRenderingUpdate();
+        scheduleRenderingUpdate();
     m_needsVisualViewportScrollEvent = true;
 }
 
@@ -7533,13 +7533,13 @@
     m_dynamicMediaQueryDependentImages.remove(element);
 }
 
-void Document::scheduleTimedRenderingUpdate()
+void Document::scheduleRenderingUpdate()
 {
 #if ENABLE(INTERSECTION_OBSERVER)
     m_intersectionObserversInitialUpdateTimer.stop();
 #endif
     if (auto page = this->page())
-        page->scheduleTimedRenderingUpdate();
+        page->scheduleRenderingUpdate();
 }
 
 #if ENABLE(INTERSECTION_OBSERVER)
@@ -7764,7 +7764,7 @@
 void Document::scheduleInitialIntersectionObservationUpdate()
 {
     if (m_readyState == Complete)
-        scheduleTimedRenderingUpdate();
+        scheduleRenderingUpdate();
     else if (!m_intersectionObserversInitialUpdateTimer.isActive())
         m_intersectionObserversInitialUpdateTimer.startOneShot(intersectionObserversInitialUpdateDelay);
 }
@@ -7856,7 +7856,7 @@
         getParserLocation(url, line, column);
         reportException("ResizeObserver loop completed with undelivered notifications.", line, column, url, nullptr, nullptr);
         // Starting a new schedule the next round of notify.
-        scheduleTimedRenderingUpdate();
+        scheduleRenderingUpdate();
     }
 }
 

Modified: trunk/Source/WebCore/dom/Document.h (268048 => 268049)


--- trunk/Source/WebCore/dom/Document.h	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/dom/Document.h	2020-10-06 15:27:50 UTC (rev 268049)
@@ -1395,7 +1395,7 @@
     void addDynamicMediaQueryDependentImage(HTMLImageElement&);
     void removeDynamicMediaQueryDependentImage(HTMLImageElement&);
 
-    void scheduleTimedRenderingUpdate();
+    void scheduleRenderingUpdate();
 
 #if ENABLE(INTERSECTION_OBSERVER)
     void addIntersectionObserver(IntersectionObserver&);

Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.cpp (268048 => 268049)


--- trunk/Source/WebCore/dom/ScriptedAnimationController.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -181,7 +181,7 @@
         return;
 
     if (auto* page = this->page())
-        page->scheduleTimedRenderingUpdate();
+        page->scheduleRenderingUpdate();
 }
 
 }

Modified: trunk/Source/WebCore/page/ChromeClient.h (268048 => 268049)


--- trunk/Source/WebCore/page/ChromeClient.h	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/ChromeClient.h	2020-10-06 15:27:50 UTC (rev 268049)
@@ -323,10 +323,12 @@
     // Sets a flag to specify that the next time content is drawn to the window,
     // the changes appear on the screen in synchrony with updates to GraphicsLayers.
     virtual void setNeedsOneShotDrawingSynchronization() = 0;
-    // Sets a flag to specify that the view needs to be updated, so we need
-    // to do an eager layout before the drawing.
+
+    // Makes a rendering update happen soon, typically in the current runloop.
     virtual void triggerRenderingUpdate() = 0;
-    virtual bool scheduleTimedRenderingUpdate() { return false; }
+    // Schedule a rendering update that coordinates with display refresh. Returns true if scheduled. (This is only used by SVGImageChromeClient.)
+    virtual bool scheduleRenderingUpdate() { return false; }
+
     // Returns whether or not the client can render the composited layer,
     // regardless of the settings.
     virtual bool allowsAcceleratedCompositing() const { return true; }

Modified: trunk/Source/WebCore/page/Page.cpp (268048 => 268049)


--- trunk/Source/WebCore/page/Page.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/Page.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -596,7 +596,7 @@
             styleResolver->invalidateMatchedDeclarationsCache();
         document.scheduleFullStyleRebuild();
         document.styleScope().didChangeStyleSheetEnvironment();
-        document.scheduleTimedRenderingUpdate();
+        document.scheduleRenderingUpdate();
     });
 }
 
@@ -1408,16 +1408,11 @@
 
 void Page::scheduleRenderingUpdate()
 {
+    if (chrome().client().scheduleRenderingUpdate())
+        return;
     renderingUpdateScheduler().scheduleRenderingUpdate();
 }
 
-void Page::scheduleTimedRenderingUpdate()
-{
-    if (chrome().client().scheduleTimedRenderingUpdate())
-        return;
-    renderingUpdateScheduler().scheduleTimedRenderingUpdate();
-}
-
 void Page::triggerRenderingUpdateForTesting()
 {
     renderingUpdateScheduler().triggerRenderingUpdateForTesting();
@@ -2931,7 +2926,7 @@
     forEachDocument([] (auto& document) {
         document.styleScope().evaluateMediaQueriesForAccessibilitySettingsChange();
         document.updateElementsAffectedByMediaQueries();
-        document.scheduleTimedRenderingUpdate();
+        document.scheduleRenderingUpdate();
     });
 }
 
@@ -2941,7 +2936,7 @@
         document.styleScope().didChangeStyleSheetEnvironment();
         document.styleScope().evaluateMediaQueriesForAppearanceChange();
         document.updateElementsAffectedByMediaQueries();
-        document.scheduleTimedRenderingUpdate();
+        document.scheduleRenderingUpdate();
     });
 }
 

Modified: trunk/Source/WebCore/page/Page.h (268048 => 268049)


--- trunk/Source/WebCore/page/Page.h	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/Page.h	2020-10-06 15:27:50 UTC (rev 268049)
@@ -488,11 +488,9 @@
     WEBCORE_EXPORT void isolatedUpdateRendering();
     WEBCORE_EXPORT void finalizeRenderingUpdate(OptionSet<FinalizeRenderingUpdateFlags>);
 
-    // Do immediate or timed update as dictated by the ChromeClient.
+    // Schedule a rerndering update that coordinates with display refresh.
     WEBCORE_EXPORT void scheduleRenderingUpdate();
-    // Schedule an update that coordinates with display refresh; the normal kind of update.
-    void scheduleTimedRenderingUpdate();
-    // Trigger a rendering update in the current runloop.
+    // Trigger a rendering update in the current runloop. Only used for testing.
     void triggerRenderingUpdateForTesting();
 
     WEBCORE_EXPORT void startTrackingRenderingUpdates();

Modified: trunk/Source/WebCore/page/PageOverlayController.cpp (268048 => 268049)


--- trunk/Source/WebCore/page/PageOverlayController.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/PageOverlayController.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -318,7 +318,7 @@
 
 void PageOverlayController::didChangeViewExposedRect()
 {
-    m_page.scheduleTimedRenderingUpdate();
+    m_page.scheduleRenderingUpdate();
 }
 
 void PageOverlayController::didScrollFrame(Frame& frame)
@@ -412,7 +412,7 @@
 
 void PageOverlayController::notifyFlushRequired(const GraphicsLayer*)
 {
-    m_page.scheduleTimedRenderingUpdate();
+    m_page.scheduleRenderingUpdate();
 }
 
 void PageOverlayController::didChangeOverlayFrame(PageOverlay& overlay)

Modified: trunk/Source/WebCore/page/RenderingUpdateScheduler.cpp (268048 => 268049)


--- trunk/Source/WebCore/page/RenderingUpdateScheduler.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/RenderingUpdateScheduler.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -71,11 +71,11 @@
 
     if (isScheduled()) {
         clearScheduled();
-        scheduleTimedRenderingUpdate();
+        scheduleRenderingUpdate();
     }
 }
 
-void RenderingUpdateScheduler::scheduleTimedRenderingUpdate()
+void RenderingUpdateScheduler::scheduleRenderingUpdate()
 {
     if (isScheduled())
         return;
@@ -149,9 +149,4 @@
     m_page.chrome().client().triggerRenderingUpdate();
 }
 
-void RenderingUpdateScheduler::scheduleRenderingUpdate()
-{
-    scheduleTimedRenderingUpdate();
 }
-
-}

Modified: trunk/Source/WebCore/page/RenderingUpdateScheduler.h (268048 => 268049)


--- trunk/Source/WebCore/page/RenderingUpdateScheduler.h	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/RenderingUpdateScheduler.h	2020-10-06 15:27:50 UTC (rev 268049)
@@ -46,7 +46,6 @@
     RenderingUpdateScheduler(Page&);
     
     void adjustRenderingUpdateFrequency();
-    void scheduleTimedRenderingUpdate();
     void scheduleRenderingUpdate();
 
     void triggerRenderingUpdateForTesting();

Modified: trunk/Source/WebCore/page/ResizeObserver.cpp (268048 => 268049)


--- trunk/Source/WebCore/page/ResizeObserver.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/ResizeObserver.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -74,7 +74,7 @@
 
     if (m_document) {
         m_document->addResizeObserver(*this);
-        m_document->scheduleTimedRenderingUpdate();
+        m_document->scheduleRenderingUpdate();
     }
 }
 

Modified: trunk/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp (268048 => 268049)


--- trunk/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -124,7 +124,7 @@
 
     void notifyFlushRequired(const GraphicsLayer*) override
     {
-        m_overlay.overlay().page()->scheduleTimedRenderingUpdate();
+        m_overlay.overlay().page()->scheduleRenderingUpdate();
     }
 
     ResourceUsageOverlay& m_overlay;

Modified: trunk/Source/WebCore/page/mac/ServicesOverlayController.mm (268048 => 268049)


--- trunk/Source/WebCore/page/mac/ServicesOverlayController.mm	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/page/mac/ServicesOverlayController.mm	2020-10-06 15:27:50 UTC (rev 268049)
@@ -121,7 +121,7 @@
     if (!m_controller)
         return;
 
-    m_controller->page().scheduleTimedRenderingUpdate();
+    m_controller->page().scheduleRenderingUpdate();
 }
 
 void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, GraphicsContext& graphicsContext, const FloatRect&, GraphicsLayerPaintBehavior)

Modified: trunk/Source/WebCore/rendering/RenderElement.cpp (268048 => 268049)


--- trunk/Source/WebCore/rendering/RenderElement.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/rendering/RenderElement.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -1406,7 +1406,7 @@
 void RenderElement::scheduleRenderingUpdateForImage(CachedImage&)
 {
     if (auto* page = document().page())
-        page->scheduleTimedRenderingUpdate();
+        page->scheduleRenderingUpdate();
 }
 
 bool RenderElement::repaintForPausedImageAnimationsIfNeeded(const IntRect& visibleRect, CachedImage& cachedImage)

Modified: trunk/Source/WebCore/svg/graphics/SVGImageClients.h (268048 => 268049)


--- trunk/Source/WebCore/svg/graphics/SVGImageClients.h	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebCore/svg/graphics/SVGImageClients.h	2020-10-06 15:27:50 UTC (rev 268049)
@@ -63,7 +63,7 @@
         imageObserver->imageFrameAvailable(*m_image, m_image->isAnimating() ? ImageAnimatingState::Yes : ImageAnimatingState::No, &r);
     }
 
-    bool scheduleTimedRenderingUpdate() final
+    bool scheduleRenderingUpdate() final
     {
         if (m_image && m_image->imageObserver())
             m_image->imageObserver()->scheduleRenderingUpdate(*m_image);

Modified: trunk/Source/WebKit/ChangeLog (268048 => 268049)


--- trunk/Source/WebKit/ChangeLog	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebKit/ChangeLog	2020-10-06 15:27:50 UTC (rev 268049)
@@ -1,3 +1,17 @@
+2020-10-06  Simon Fraser  <simon.fra...@apple.com>
+
+        Rename scheduleTimedRenderingUpdate() to scheduleRenderingUpdate() everywhere
+        https://bugs.webkit.org/show_bug.cgi?id=217367
+
+        Reviewed by Alex Christensen.
+
+        The previously named scheduleImmediateRenderingUpdate() is no more, so all rendering
+        updates that WebCore knows about are of the timed variety. So just call them 
+        scheduleRenderingUpdate() everywhere.
+
+        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp:
+        (WebKit::LayerTreeHost::layerFlushTimerFired):
+
 2020-10-06  Adrian Perez de Castro  <ape...@igalia.com>
 
         REGRESSION(r267399): [WPE] Build broken with ENABLE_ACCESSIBILITY=OFF

Modified: trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp (268048 => 268049)


--- trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp	2020-10-06 14:51:42 UTC (rev 268048)
+++ trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHostTextureMapper.cpp	2020-10-06 15:27:50 UTC (rev 268049)
@@ -97,7 +97,7 @@
 
     // In case an animation is running, we should flush again soon.
     if (downcast<GraphicsLayerTextureMapper>(m_rootLayer.get())->layer().descendantsOrSelfHaveRunningAnimations())
-        m_webPage.corePage()->scheduleTimedRenderingUpdate();
+        m_webPage.corePage()->scheduleRenderingUpdate();
 }
 
 LayerTreeHost::LayerTreeHost(WebPage& webPage)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to