Changeset 150898 in webkit
- Timestamp:
- May 29, 2013 9:04:12 AM (11 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r150897 r150898 1 2013-05-29 Simon Fraser <simon.fraser@apple.com> 2 3 Fix the firing of m_paintRelatedMilestonesTimer 4 https://bugs.webkit.org/show_bug.cgi?id=116919 5 6 Reviewed by Tim Horton. 7 8 r150671 intended to change things so that paint-related milestones 9 only fire when painting has actually happened, so that WebKit clients 10 are notified when we actually have bits to present. 11 12 However, it made an incorrect assumption that painting would happen 13 inside of flushCompositingState(). This is not the case; flushCompositingState() 14 will just dirty CALayers, and later on Core Animation will ask us to paint them. 15 16 This incorrect assumption meant that we would never start the 17 m_paintRelatedMilestonesTimer, so never fire the milestones. 18 19 Fix by starting the m_paintRelatedMilestonesTimer via the RenderLayerBacking 20 paintContents call back. At this time we know we're painting, so we can both 21 set the FrameView's last paint time, and start up the timer. We also only 22 want to start the timer if there are pending milestones. 23 24 * rendering/RenderLayerBacking.cpp: 25 (WebCore::RenderLayerBacking::paintIntoLayer): 26 (WebCore::RenderLayerBacking::paintContents): 27 * rendering/RenderLayerCompositor.cpp: 28 (WebCore::RenderLayerCompositor::flushPendingLayerChanges): 29 (WebCore::RenderLayerCompositor::didPaintBacking): 30 * rendering/RenderLayerCompositor.h: 31 (RenderLayerCompositor): 32 1 33 2013-05-29 Antti Koivisto <antti@apple.com> 2 34 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r150685 r150898 59 59 #include "StyleResolver.h" 60 60 #include "TiledBacking.h" 61 #include <wtf/CurrentTime.h>62 61 #include <wtf/text/StringBuilder.h> 63 62 … … 1979 1978 m_owningLayer->paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars); 1980 1979 1980 compositor()->didPaintBacking(this); 1981 1981 1982 ASSERT(!m_owningLayer->m_usedTransparency); 1982 1983 } … … 2018 2019 // We have to use the same root as for hit testing, because both methods can compute and cache clipRects. 2019 2020 paintIntoLayer(graphicsLayer, &context, dirtyRect, PaintBehaviorNormal, paintingPhase); 2020 2021 if (m_usingTiledCacheLayer)2022 renderer()->frame()->view()->setLastPaintTime(currentTime());2023 2021 2024 2022 InspectorInstrumentation::didPaint(renderer(), &context, clip); -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r150671 r150898 60 60 #include "TiledBacking.h" 61 61 #include "TransformState.h" 62 #include <wtf/CurrentTime.h> 62 63 #include <wtf/TemporaryChange.h> 63 64 64 65 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) 65 66 #include "HTMLMediaElement.h" 66 #endif67 68 #if !LOG_DISABLED69 #include <wtf/CurrentTime.h>70 67 #endif 71 68 … … 374 371 m_flushingLayers = false; 375 372 376 if (!m_paintRelatedMilestonesTimer.isActive() && frameView->hasEverPainted())377 m_paintRelatedMilestonesTimer.startOneShot(0);378 379 373 if (!m_viewportConstrainedLayersNeedingUpdate.isEmpty()) { 380 374 HashSet<RenderLayer*>::const_iterator end = m_viewportConstrainedLayersNeedingUpdate.end(); … … 395 389 if (backing->backgroundLayerPaintsFixedRootBackground() && graphicsLayer == backing->backgroundLayer()) 396 390 fixedRootBackgroundLayerChanged(); 391 } 392 393 void RenderLayerCompositor::didPaintBacking(RenderLayerBacking*) 394 { 395 FrameView* frameView = m_renderView->frameView(); 396 397 frameView->setLastPaintTime(currentTime()); 398 399 if (frameView->milestonesPendingPaint() && !m_paintRelatedMilestonesTimer.isActive()) 400 m_paintRelatedMilestonesTimer.startOneShot(0); 397 401 } 398 402 -
trunk/Source/WebCore/rendering/RenderLayerCompositor.h
r150433 r150898 282 282 void setLayerFlushThrottlingEnabled(bool); 283 283 void disableLayerFlushThrottlingTemporarilyForInteraction(); 284 285 void didPaintBacking(RenderLayerBacking*); 284 286 285 287 private:
Note: See TracChangeset
for help on using the changeset viewer.