Changeset 244837 in webkit
- Timestamp:
- May 1, 2019 12:31:06 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r244828 r244837 1 2019-05-01 Said Abou-Hallawa <sabouhallawa@apple.com> 2 3 REGRESSION (r244182): RenderingUpdate should not be scheduled for invisible pages 4 https://bugs.webkit.org/show_bug.cgi?id=197451 5 6 Reviewed by Simon Fraser. 7 8 Before r244182, some web pages never need to schedule a RenderingUpdate. 9 Only pages with rAF callbacks, web animations, intersection and resize 10 observers needed to do so. After r244182, all pages have to schedule a 11 RenderingUpdate when a page rendering update is required. 12 13 When Safari opens, it create a 'blank' web page. The blank page will not 14 be visible unless the user selects to show the 'Empty page' in the new 15 tab. Although the blank page is not visible, the loader needs to resolveStyle() 16 which requires to scheduleLayerFlushNow(). 17 18 We need to optimize this case: calling scheduleLayerFlushNow() for invisible 19 pages. We do that by checking if the page is visible before scheduling 20 the RenderingUpdate. 21 22 Also we need to change or get rid of scheduleLayerFlushNow() since its name 23 has become confusing. It suggests that it is going to schedule flushing 24 the layer 'now'. But after r244182, it does scheduleRenderingUpdate() first. 25 And when it fires, scheduleCompositingLayerFlush() will be called. 26 27 * page/RenderingUpdateScheduler.cpp: 28 (WebCore::RenderingUpdateScheduler::scheduleRenderingUpdate): 29 * rendering/RenderLayerCompositor.cpp: 30 (WebCore::RenderLayerCompositor::scheduleLayerFlush): 31 (WebCore::RenderLayerCompositor::didChangeVisibleRect): 32 (WebCore::RenderLayerCompositor::frameViewDidScroll): 33 (WebCore::RenderLayerCompositor::attachRootLayer): 34 (WebCore::RenderLayerCompositor::setLayerFlushThrottlingEnabled): 35 (WebCore::RenderLayerCompositor::layerFlushTimerFired): 36 (WebCore::RenderLayerCompositor::scheduleLayerFlushNow): Deleted. 37 * rendering/RenderLayerCompositor.h: 38 1 39 2019-05-01 Darin Adler <darin@apple.com> 2 40 -
trunk/Source/WebCore/page/RenderingUpdateScheduler.cpp
r244182 r244837 47 47 if (isScheduled()) 48 48 return; 49 50 // Optimize the case when an invisible page wants just to schedule layer flush. 51 if (!m_page.isVisible()) { 52 scheduleCompositingLayerFlush(); 53 return; 54 } 49 55 50 56 tracePoint(ScheduleRenderingUpdate); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r244752 r244837 454 454 } 455 455 456 void RenderLayerCompositor::scheduleLayerFlushNow()457 {458 m_hasPendingLayerFlush = false;459 page().renderingUpdateScheduler().scheduleRenderingUpdate();460 }461 462 456 void RenderLayerCompositor::scheduleLayerFlush(bool canThrottle) 463 457 { … … 467 461 startInitialLayerFlushTimerIfNeeded(); 468 462 469 if (canThrottle && isThrottlingLayerFlushes()) {463 if (canThrottle && isThrottlingLayerFlushes()) 470 464 m_hasPendingLayerFlush = true; 471 return; 472 } 473 scheduleLayerFlushNow(); 465 else { 466 m_hasPendingLayerFlush = false; 467 page().renderingUpdateScheduler().scheduleRenderingUpdate(); 468 } 474 469 } 475 470 … … 608 603 LOG_WITH_STREAM(Compositing, stream << "RenderLayerCompositor::didChangeVisibleRect " << visibleRect << " requiresFlush " << requiresFlush); 609 604 if (requiresFlush) 610 scheduleLayerFlush Now();605 scheduleLayerFlush(); 611 606 } 612 607 … … 1912 1907 if (hasCoordinatedScrolling()) { 1913 1908 // We have to schedule a flush in order for the main TiledBacking to update its tile coverage. 1914 scheduleLayerFlush Now();1909 scheduleLayerFlush(); 1915 1910 return; 1916 1911 } … … 3803 3798 3804 3799 if (m_shouldFlushOnReattach) { 3805 scheduleLayerFlush Now();3800 scheduleLayerFlush(); 3806 3801 m_shouldFlushOnReattach = false; 3807 3802 } … … 4375 4370 if (!m_hasPendingLayerFlush) 4376 4371 return; 4377 scheduleLayerFlush Now();4372 scheduleLayerFlush(); 4378 4373 } 4379 4374 … … 4418 4413 if (!m_hasPendingLayerFlush) 4419 4414 return; 4420 scheduleLayerFlush Now();4415 scheduleLayerFlush(); 4421 4416 } 4422 4417 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r243209 r244837 169 169 // GraphicsLayers buffer state, which gets pushed to the underlying platform layers 170 170 // at specific times. 171 void scheduleLayerFlush(bool canThrottle );171 void scheduleLayerFlush(bool canThrottle = false); 172 172 void flushPendingLayerChanges(bool isFlushRoot = true); 173 173 … … 527 527 bool shouldCompositeOverflowControls() const; 528 528 529 void scheduleLayerFlushNow();530 529 bool isThrottlingLayerFlushes() const; 531 530 void startInitialLayerFlushTimerIfNeeded();
Note: See TracChangeset
for help on using the changeset viewer.