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 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2430 ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); | 2430 ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); |
2431 | 2431 |
2432 if (phases == AllPhases) { | 2432 if (phases == AllPhases) { |
2433 invalidateTreeIfNeededRecursive(); | 2433 invalidateTreeIfNeededRecursive(); |
2434 | 2434 |
2435 if (view->compositor()->inCompositingMode()) | 2435 if (view->compositor()->inCompositingMode()) |
2436 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded(); | 2436 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded(); |
2437 | 2437 |
2438 updateCompositedSelectionIfNeeded(); | 2438 updateCompositedSelectionIfNeeded(); |
2439 | 2439 |
| 2440 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
| 2441 calculatePaintProperties(); |
| 2442 |
2440 if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled
()) { | 2443 if (RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled
()) { |
2441 synchronizedPaint(interestRect); | 2444 synchronizedPaint(interestRect); |
2442 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 2445 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
2443 compositeForSlimmingPaintV2(); | 2446 compositeForSlimmingPaintV2(); |
2444 } | 2447 } |
2445 | 2448 |
2446 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) | 2449 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) |
2447 updateFrameTimingRequestsIfNeeded(); | 2450 updateFrameTimingRequestsIfNeeded(); |
2448 | 2451 |
2449 ASSERT(!view->hasPendingSelection()); | 2452 ASSERT(!view->hasPendingSelection()); |
2450 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationCl
ean | 2453 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationCl
ean |
2451 || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && lifecycl
e().state() == DocumentLifecycle::CompositingForSlimmingPaintV2Clean)); | 2454 || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && lifecycl
e().state() == DocumentLifecycle::CompositingForSlimmingPaintV2Clean)); |
2452 } | 2455 } |
2453 } | 2456 } |
2454 } | 2457 } |
2455 | 2458 |
| 2459 void FrameView::calculatePaintProperties() |
| 2460 { |
| 2461 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
| 2462 |
| 2463 // Detached frames can have no root graphics layer so skip even calculating
paint properties. |
| 2464 if (!layoutView()->layer()->graphicsLayerBacking()) |
| 2465 return; |
| 2466 |
| 2467 lifecycle().advanceTo(DocumentLifecycle::InCalcPaintProps); |
| 2468 // TODO(pdr): Calculate the paint properties by walking the layout tree. |
| 2469 lifecycle().advanceTo(DocumentLifecycle::CalcPaintPropsClean); |
| 2470 } |
| 2471 |
2456 void FrameView::synchronizedPaint(const LayoutRect& interestRect) | 2472 void FrameView::synchronizedPaint(const LayoutRect& interestRect) |
2457 { | 2473 { |
2458 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); | 2474 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); |
2459 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); | 2475 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); |
2460 | 2476 |
2461 LayoutView* view = layoutView(); | 2477 LayoutView* view = layoutView(); |
2462 ASSERT(view); | 2478 ASSERT(view); |
2463 GraphicsLayer* rootGraphicsLayer = view->layer()->graphicsLayerBacking(); | 2479 GraphicsLayer* rootGraphicsLayer = view->layer()->graphicsLayerBacking(); |
2464 | 2480 |
2465 // Detached frames can have no root graphics layer. | 2481 // Detached frames can have no root graphics layer. |
(...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3919 | 3935 |
3920 if (!graphicsLayer) | 3936 if (!graphicsLayer) |
3921 return; | 3937 return; |
3922 | 3938 |
3923 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); | 3939 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL
ayoutObject(), paintInvalidationContainer, viewRect); |
3924 | 3940 |
3925 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); | 3941 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web
Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing
IntRect(viewRect))); |
3926 } | 3942 } |
3927 | 3943 |
3928 } // namespace blink | 3944 } // namespace blink |
OLD | NEW |