OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Dirk Mueller <mueller@kde.org> | 5 * 2000 Dirk Mueller <mueller@kde.org> |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) | 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) |
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) | 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) |
9 * Copyright (C) 2009 Google Inc. All rights reserved. | 9 * Copyright (C) 2009 Google Inc. All rights reserved. |
10 * | 10 * |
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2446 LayoutView* view = layoutView(); | 2446 LayoutView* view = layoutView(); |
2447 if (view) | 2447 if (view) |
2448 view->compositor()->updateIfNeededRecursive(); | 2448 view->compositor()->updateIfNeededRecursive(); |
2449 scrollContentsIfNeededRecursive(); | 2449 scrollContentsIfNeededRecursive(); |
2450 | 2450 |
2451 ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); | 2451 ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); |
2452 } | 2452 } |
2453 | 2453 |
2454 void FrameView::updateAllLifecyclePhasesInternal() | 2454 void FrameView::updateAllLifecyclePhasesInternal() |
2455 { | 2455 { |
2456 // This must be called from the root frame, since it recurses down, not up.
Otherwise the lifecycles of the frames might be out of sync. | 2456 // This must be called from the root frame, since it recurses down, not up. |
2457 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); | 2457 // Otherwise the lifecycles of the frames might be out of sync. |
| 2458 ASSERT(m_frame->isLocalRoot()); |
2458 | 2459 |
2459 // Updating layout can run script, which can tear down the FrameView. | 2460 // Updating layout can run script, which can tear down the FrameView. |
2460 RefPtrWillBeRawPtr<FrameView> protector(this); | 2461 RefPtrWillBeRawPtr<FrameView> protector(this); |
2461 | 2462 |
2462 updateStyleAndLayoutIfNeededRecursive(); | 2463 updateStyleAndLayoutIfNeededRecursive(); |
2463 | 2464 |
2464 LayoutView* view = layoutView(); | 2465 if (LayoutView* view = layoutView()) { |
2465 if (view) { | |
2466 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUp
dateLayerTreeEvent::data(m_frame.get())); | 2466 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUp
dateLayerTreeEvent::data(m_frame.get())); |
2467 | 2467 |
2468 view->compositor()->updateIfNeededRecursive(); | 2468 view->compositor()->updateIfNeededRecursive(); |
2469 scrollContentsIfNeededRecursive(); | 2469 scrollContentsIfNeededRecursive(); |
2470 invalidateTreeIfNeededRecursive(); | 2470 invalidateTreeIfNeededRecursive(); |
2471 updatePostLifecycleData(); | 2471 |
| 2472 if (view->compositor()->inCompositingMode()) |
| 2473 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded(); |
| 2474 |
| 2475 updateCompositedSelectionIfNeeded(); |
| 2476 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) |
| 2477 updateFrameTimingRequestsIfNeeded(); |
2472 | 2478 |
2473 ASSERT(!view->hasPendingSelection()); | 2479 ASSERT(!view->hasPendingSelection()); |
2474 } | 2480 } |
2475 | 2481 |
2476 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean); | 2482 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean); |
2477 } | 2483 } |
2478 | 2484 |
2479 void FrameView::updatePostLifecycleData() | |
2480 { | |
2481 LayoutView* view = layoutView(); | |
2482 ASSERT(view); | |
2483 | |
2484 if (view->compositor()->inCompositingMode() && m_frame->isLocalRoot()) | |
2485 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded(); | |
2486 | |
2487 updateCompositedSelectionIfNeeded(); | |
2488 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) | |
2489 updateFrameTimingRequestsIfNeeded(); | |
2490 } | |
2491 | |
2492 void FrameView::updateFrameTimingRequestsIfNeeded() | 2485 void FrameView::updateFrameTimingRequestsIfNeeded() |
2493 { | 2486 { |
2494 GraphicsLayerFrameTimingRequests graphicsLayerTimingRequests; | 2487 GraphicsLayerFrameTimingRequests graphicsLayerTimingRequests; |
2495 // TODO(mpb) use a 'dirty' bit to not call this every time. | 2488 // TODO(mpb) use a 'dirty' bit to not call this every time. |
2496 collectFrameTimingRequestsRecursive(graphicsLayerTimingRequests); | 2489 collectFrameTimingRequestsRecursive(graphicsLayerTimingRequests); |
2497 | 2490 |
2498 for (const auto& iter : graphicsLayerTimingRequests) { | 2491 for (const auto& iter : graphicsLayerTimingRequests) { |
2499 const GraphicsLayer* graphicsLayer = iter.key; | 2492 const GraphicsLayer* graphicsLayer = iter.key; |
2500 graphicsLayer->platformLayer()->setFrameTimingRequests(iter.value); | 2493 graphicsLayer->platformLayer()->setFrameTimingRequests(iter.value); |
2501 } | 2494 } |
(...skipping 1432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3934 | 3927 |
3935 if (!graphicsLayer) | 3928 if (!graphicsLayer) |
3936 return; | 3929 return; |
3937 | 3930 |
3938 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3931 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
3939 | 3932 |
3940 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3933 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
3941 } | 3934 } |
3942 | 3935 |
3943 } // namespace blink | 3936 } // namespace blink |
OLD | NEW |