WebKit Bugzilla
Attachment 371638 Details for
Bug 198664
: REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198664-20190607180219.patch (text/plain), 17.22 KB, created by
Said Abou-Hallawa
on 2019-06-07 18:02:20 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Said Abou-Hallawa
Created:
2019-06-07 18:02:20 PDT
Size:
17.22 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 246210) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,59 @@ >+2019-06-07 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately >+ https://bugs.webkit.org/show_bug.cgi?id=198664 >+ >+ Reviewed by Simon Fraser. >+ >+ Because WK1 is a single process, scheduleCompositingLayerFlush() has to >+ be called immediately when layers' update is needed. Otherwise no content >+ will be drawn for the current frame. Doing this will get smooth scrolling >+ back to WK1. >+ >+ RenderingUpdateScheduler now has three different scheduling methods: >+ >+ 1. scheduleTimedRenderingUpdate(): This is a two-steps scheduling method. >+ DisplayRefreshMonitor has to fire before scheduleCompositingLayerFlush() >+ is called. This is used by rAF, WebAnimations and intersection and >+ resize observers. >+ >+ 2. scheduleImmediateRenderingUpdate(): This is a one-step scheduling method. >+ layerTreeAsText() calls this method because it has to process the rendering >+ update within the current frame. >+ >+ 3. scheduleRenderingUpdate(): RenderLayerCompositor::scheduleLayerFlush() >+ calls this function to decide either immediately flush layers or wait >+ for the next timed frame. scheduleImmediateRenderingUpdate() will be >+ called for WK1. scheduleTimedRenderingUpdate() will be called for WK2. >+ >+ * animation/DocumentTimeline.cpp: >+ (WebCore::DocumentTimeline::scheduleAnimationResolution): >+ * dom/Document.cpp: >+ (WebCore::Document::scheduleTimedRenderingUpdate): >+ (WebCore::Document::scheduleInitialIntersectionObservationUpdate): >+ (WebCore::Document::updateResizeObservations): >+ (WebCore::Document::scheduleRenderingUpdate): Deleted. >+ * dom/Document.h: >+ * dom/ScriptedAnimationController.cpp: >+ (WebCore::ScriptedAnimationController::scheduleAnimation): >+ * page/ChromeClient.h: >+ * page/PageOverlayController.cpp: >+ (WebCore::PageOverlayController::didChangeViewExposedRect): >+ (WebCore::PageOverlayController::notifyFlushRequired): >+ * page/RenderingUpdateScheduler.cpp: >+ (WebCore::RenderingUpdateScheduler::scheduleTimedRenderingUpdate): >+ (WebCore::RenderingUpdateScheduler::displayRefreshFired): >+ (WebCore::RenderingUpdateScheduler::scheduleImmediateRenderingUpdate): >+ (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate): >+ (WebCore::RenderingUpdateScheduler::scheduleCompositingLayerFlush): Deleted. >+ * page/RenderingUpdateScheduler.h: >+ * page/ResizeObserver.cpp: >+ (WebCore::ResizeObserver::observe): >+ * page/mac/ServicesOverlayController.mm: >+ (WebCore::ServicesOverlayController::Highlight::notifyFlushRequired): >+ * rendering/RenderLayerCompositor.cpp: >+ (WebCore::RenderLayerCompositor::layerTreeAsText): >+ > 2019-06-07 Zalan Bujtas <zalan@apple.com> > > Images are not resizing correctly when dragged to a message in 1/3 view >Index: Source/WebCore/animation/DocumentTimeline.cpp >=================================================================== >--- Source/WebCore/animation/DocumentTimeline.cpp (revision 246202) >+++ Source/WebCore/animation/DocumentTimeline.cpp (working copy) >@@ -318,7 +318,7 @@ void DocumentTimeline::scheduleAnimation > if (!m_document || !m_document->page()) > return; > >- m_document->page()->renderingUpdateScheduler().scheduleRenderingUpdate(); >+ m_document->page()->renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > m_animationResolutionScheduled = true; > } > >Index: Source/WebCore/dom/Document.cpp >=================================================================== >--- Source/WebCore/dom/Document.cpp (revision 246202) >+++ Source/WebCore/dom/Document.cpp (working copy) >@@ -540,7 +540,7 @@ Document::Document(Frame* frame, const U > #endif > #if ENABLE(INTERSECTION_OBSERVER) > , m_intersectionObserversNotifyTimer(*this, &Document::notifyIntersectionObserversTimerFired) >- , m_intersectionObserversInitialUpdateTimer(*this, &Document::scheduleRenderingUpdate) >+ , m_intersectionObserversInitialUpdateTimer(*this, &Document::scheduleTimedRenderingUpdate) > #endif > , m_loadEventDelayTimer(*this, &Document::loadEventDelayTimerFired) > #if PLATFORM(IOS_FAMILY) && ENABLE(DEVICE_ORIENTATION) >@@ -7291,10 +7291,10 @@ void Document::removeAppearanceDependent > m_appearanceDependentPictures.remove(&picture); > } > >-void Document::scheduleRenderingUpdate() >+void Document::scheduleTimedRenderingUpdate() > { > if (auto page = this->page()) >- page->renderingUpdateScheduler().scheduleRenderingUpdate(); >+ page->renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > } > > #if ENABLE(INTERSECTION_OBSERVER) >@@ -7522,7 +7522,7 @@ void Document::notifyIntersectionObserve > void Document::scheduleInitialIntersectionObservationUpdate() > { > if (m_readyState == Complete) >- scheduleRenderingUpdate(); >+ scheduleTimedRenderingUpdate(); > else if (!m_intersectionObserversInitialUpdateTimer.isActive()) > m_intersectionObserversInitialUpdateTimer.startOneShot(intersectionObserversInitialUpdateDelay); > } >@@ -7604,7 +7604,7 @@ void Document::updateResizeObservations( > 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. >- scheduleRenderingUpdate(); >+ scheduleTimedRenderingUpdate(); > } > } > #endif >Index: Source/WebCore/dom/Document.h >=================================================================== >--- Source/WebCore/dom/Document.h (revision 246202) >+++ Source/WebCore/dom/Document.h (working copy) >@@ -1380,7 +1380,7 @@ public: > void addAppearanceDependentPicture(HTMLPictureElement&); > void removeAppearanceDependentPicture(HTMLPictureElement&); > >- void scheduleRenderingUpdate(); >+ void scheduleTimedRenderingUpdate(); > > #if ENABLE(INTERSECTION_OBSERVER) > void addIntersectionObserver(IntersectionObserver&); >Index: Source/WebCore/dom/ScriptedAnimationController.cpp >=================================================================== >--- Source/WebCore/dom/ScriptedAnimationController.cpp (revision 246202) >+++ Source/WebCore/dom/ScriptedAnimationController.cpp (working copy) >@@ -256,7 +256,7 @@ void ScriptedAnimationController::schedu > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) > if (!m_isUsingTimer && !isThrottled()) { > if (auto* page = this->page()) { >- page->renderingUpdateScheduler().scheduleRenderingUpdate(); >+ page->renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > return; > } > >Index: Source/WebCore/page/ChromeClient.h >=================================================================== >--- Source/WebCore/page/ChromeClient.h (revision 246202) >+++ Source/WebCore/page/ChromeClient.h (working copy) >@@ -320,6 +320,7 @@ public: > // Sets a flag to specify that the view needs to be updated, so we need > // to do an eager layout before the drawing. > virtual void scheduleCompositingLayerFlush() = 0; >+ virtual bool needsImmediateRenderingUpdate() const { return false; } > // Returns whether or not the client can render the composited layer, > // regardless of the settings. > virtual bool allowsAcceleratedCompositing() const { return true; } >Index: Source/WebCore/page/PageOverlayController.cpp >=================================================================== >--- Source/WebCore/page/PageOverlayController.cpp (revision 246202) >+++ Source/WebCore/page/PageOverlayController.cpp (working copy) >@@ -318,7 +318,7 @@ void PageOverlayController::didChangeDev > > void PageOverlayController::didChangeViewExposedRect() > { >- m_page.renderingUpdateScheduler().scheduleRenderingUpdate(); >+ m_page.renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > } > > void PageOverlayController::didScrollFrame(Frame& frame) >@@ -412,7 +412,7 @@ float PageOverlayController::deviceScale > > void PageOverlayController::notifyFlushRequired(const GraphicsLayer*) > { >- m_page.renderingUpdateScheduler().scheduleRenderingUpdate(); >+ m_page.renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > } > > void PageOverlayController::didChangeOverlayFrame(PageOverlay& overlay) >Index: Source/WebCore/page/RenderingUpdateScheduler.cpp >=================================================================== >--- Source/WebCore/page/RenderingUpdateScheduler.cpp (revision 246202) >+++ Source/WebCore/page/RenderingUpdateScheduler.cpp (working copy) >@@ -42,14 +42,14 @@ RenderingUpdateScheduler::RenderingUpdat > #endif > } > >-void RenderingUpdateScheduler::scheduleRenderingUpdate() >+void RenderingUpdateScheduler::scheduleTimedRenderingUpdate() > { > if (isScheduled()) > return; > > // Optimize the case when an invisible page wants just to schedule layer flush. > if (!m_page.isVisible()) { >- scheduleCompositingLayerFlush(); >+ scheduleImmediateRenderingUpdate(); > return; > } > >@@ -102,12 +102,20 @@ void RenderingUpdateScheduler::displayRe > tracePoint(TriggerRenderingUpdate); > > clearScheduled(); >- scheduleCompositingLayerFlush(); >+ scheduleImmediateRenderingUpdate(); > } > >-void RenderingUpdateScheduler::scheduleCompositingLayerFlush() >+void RenderingUpdateScheduler::scheduleImmediateRenderingUpdate() > { > m_page.chrome().client().scheduleCompositingLayerFlush(); > } > >+void RenderingUpdateScheduler::scheduleRenderingUpdate() >+{ >+ if (m_page.chrome().client().needsImmediateRenderingUpdate()) >+ scheduleImmediateRenderingUpdate(); >+ else >+ scheduleTimedRenderingUpdate(); >+} >+ > } >Index: Source/WebCore/page/RenderingUpdateScheduler.h >=================================================================== >--- Source/WebCore/page/RenderingUpdateScheduler.h (revision 246202) >+++ Source/WebCore/page/RenderingUpdateScheduler.h (working copy) >@@ -46,8 +46,9 @@ public: > } > > RenderingUpdateScheduler(Page&); >+ void scheduleTimedRenderingUpdate(); >+ void scheduleImmediateRenderingUpdate(); > void scheduleRenderingUpdate(); >- void scheduleCompositingLayerFlush(); > > private: > #if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR) >Index: Source/WebCore/page/ResizeObserver.cpp >=================================================================== >--- Source/WebCore/page/ResizeObserver.cpp (revision 246202) >+++ Source/WebCore/page/ResizeObserver.cpp (working copy) >@@ -73,7 +73,7 @@ void ResizeObserver::observe(Element& ta > > if (m_document) { > m_document->addResizeObserver(*this); >- m_document->scheduleRenderingUpdate(); >+ m_document->scheduleTimedRenderingUpdate(); > } > } > >Index: Source/WebCore/page/mac/ServicesOverlayController.mm >=================================================================== >--- Source/WebCore/page/mac/ServicesOverlayController.mm (revision 246202) >+++ Source/WebCore/page/mac/ServicesOverlayController.mm (working copy) >@@ -121,7 +121,7 @@ void ServicesOverlayController::Highligh > if (!m_controller) > return; > >- m_controller->page().renderingUpdateScheduler().scheduleRenderingUpdate(); >+ m_controller->page().renderingUpdateScheduler().scheduleTimedRenderingUpdate(); > } > > void ServicesOverlayController::Highlight::paintContents(const GraphicsLayer*, GraphicsContext& graphicsContext, OptionSet<GraphicsLayerPaintingPhase>, const FloatRect&, GraphicsLayerPaintBehavior) >Index: Source/WebCore/rendering/RenderLayerCompositor.cpp >=================================================================== >--- Source/WebCore/rendering/RenderLayerCompositor.cpp (revision 246202) >+++ Source/WebCore/rendering/RenderLayerCompositor.cpp (working copy) >@@ -2061,7 +2061,7 @@ String RenderLayerCompositor::layerTreeA > return String(); > > flushPendingLayerChanges(true); >- page().renderingUpdateScheduler().scheduleCompositingLayerFlush(); >+ page().renderingUpdateScheduler().scheduleImmediateRenderingUpdate(); > > LayerTreeAsTextBehavior layerTreeBehavior = LayerTreeAsTextBehaviorNormal; > if (flags & LayerTreeFlagsIncludeDebugInfo) >Index: Source/WebKitLegacy/mac/ChangeLog >=================================================================== >--- Source/WebKitLegacy/mac/ChangeLog (revision 246202) >+++ Source/WebKitLegacy/mac/ChangeLog (working copy) >@@ -1 +1,13 @@ >+2019-06-07 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately >+ https://bugs.webkit.org/show_bug.cgi?id=198664 >+ >+ Reviewed by Simon Fraser. >+ >+ WK1 has to skip using DisplayRefreshMonitor when layers need to be updated. >+ >+ * WebCoreSupport/WebChromeClient.h: >+ (WebChromeClient::needsImmediateScheduleCompositingLayerFlush): >+ > == Rolled over to ChangeLog-2019-06-05 == >Index: Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h >=================================================================== >--- Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h (revision 246202) >+++ Source/WebKitLegacy/mac/WebCoreSupport/WebChromeClient.h (working copy) >@@ -176,6 +176,7 @@ private: > void attachViewOverlayGraphicsLayer(WebCore::GraphicsLayer*) final; > void setNeedsOneShotDrawingSynchronization() final; > void scheduleCompositingLayerFlush() final; >+ bool needsImmediateRenderingUpdate() const final { return true; } > > CompositingTriggerFlags allowedCompositingTriggers() const final > { >Index: Source/WebKitLegacy/win/ChangeLog >=================================================================== >--- Source/WebKitLegacy/win/ChangeLog (revision 246206) >+++ Source/WebKitLegacy/win/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2019-06-07 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately >+ https://bugs.webkit.org/show_bug.cgi?id=198664 >+ >+ Reviewed by Simon Fraser. >+ >+ WK1 has to skip using DisplayRefreshMonitor when layers need to be updated. >+ >+ * WebCoreSupport/WebChromeClient.h: >+ > 2019-05-31 Don Olmstead <don.olmstead@sony.com> > > [CMake] Add WebKit::WTF target >Index: Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.h >=================================================================== >--- Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.h (revision 246202) >+++ Source/WebKitLegacy/win/WebCoreSupport/WebChromeClient.h (working copy) >@@ -133,6 +133,7 @@ public: > // Sets a flag to specify that the view needs to be updated, so we need > // to do an eager layout before the drawing. > void scheduleCompositingLayerFlush() final; >+ bool needsImmediateRenderingUpdate() const final { return true; } > > #if PLATFORM(WIN) && USE(AVFOUNDATION) > WebCore::GraphicsDeviceAdapter* graphicsDeviceAdapter() const final; >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 246225) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2019-06-07 Said Abou-Hallawa <sabouhallawa@apple.com> >+ >+ REGRESSION (r244182) [WK1]: Page updates should always scheduleCompositingLayerFlush() immediately >+ https://bugs.webkit.org/show_bug.cgi?id=198664 >+ >+ Reviewed by Simon Fraser. >+ >+ Delete repeated entries which were submitted by mistake. >+ >+ * Tracing/SystemTracePoints.plist: >+ > 2019-06-07 Daniel Bates <dabates@apple.com> > > [lldb-webkit] Pretty-print all kinds of Documents >Index: Tools/Tracing/SystemTracePoints.plist >=================================================================== >--- Tools/Tracing/SystemTracePoints.plist (revision 246202) >+++ Tools/Tracing/SystemTracePoints.plist (working copy) >@@ -262,38 +262,6 @@ > </dict> > <dict> > <key>Name</key> >- <string>Schedule rendering update</string> >- <key>Type</key> >- <string>Impulse</string> >- <key>Component</key> >- <string>47</string> >- <key>Code</key> >- <string>5028</string> >- </dict> >- <dict> >- <key>Name</key> >- <string>Trigger rendering update</string> >- <key>Type</key> >- <string>Impulse</string> >- <key>Component</key> >- <string>47</string> >- <key>Code</key> >- <string>5029</string> >- </dict> >- <dict> >- <key>Name</key> >- <string>Rendering update</string> >- <key>Type</key> >- <string>Interval</string> >- <key>Component</key> >- <string>47</string> >- <key>CodeBegin</key> >- <string>5030</string> >- <key>CodeEnd</key> >- <string>5031</string> >- </dict> >- <dict> >- <key>Name</key> > <string>Paint WebHTMLView</string> > <key>Type</key> > <string>Interval</string>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198664
:
371594
|
371603
|
371626
|
371638
|
371642
|
371644