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 2499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2510 ASSERT(graphicsLayer->paintController()); | 2510 ASSERT(graphicsLayer->paintController()); |
2511 GraphicsContext context(*graphicsLayer->paintController()); | 2511 GraphicsContext context(*graphicsLayer->paintController()); |
2512 | 2512 |
2513 // TODO(chrishtr): fix unit tests to not inject one-off interest rects. | 2513 // TODO(chrishtr): fix unit tests to not inject one-off interest rects. |
2514 if (interestRect) | 2514 if (interestRect) |
2515 graphicsLayer->paint(context, roundedIntRect(*interestRect)); | 2515 graphicsLayer->paint(context, roundedIntRect(*interestRect)); |
2516 else | 2516 else |
2517 graphicsLayer->paintIfNeeded(context); | 2517 graphicsLayer->paintIfNeeded(context); |
2518 | 2518 |
2519 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 2519 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
2520 graphicsLayer->paintController()->commitNewDisplayItems(graphicsLayer); | 2520 graphicsLayer->paintController()->commitNewDisplayItems(); |
2521 | 2521 |
2522 for (auto& child : graphicsLayer->children()) | 2522 for (auto& child : graphicsLayer->children()) |
2523 synchronizedPaintRecursively(child, interestRect); | 2523 synchronizedPaintRecursively(child, interestRect); |
2524 } | 2524 } |
2525 | 2525 |
2526 void FrameView::compositeForSlimmingPaintV2() | 2526 void FrameView::compositeForSlimmingPaintV2() |
2527 { | 2527 { |
2528 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); | 2528 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); |
2529 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); | 2529 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF
rame())); |
2530 | 2530 |
2531 forAllFrameViews([](FrameView& frameView) { frameView.lifecycle().advanceTo(
DocumentLifecycle::InCompositingForSlimmingPaintV2); }); | 2531 forAllFrameViews([](FrameView& frameView) { frameView.lifecycle().advanceTo(
DocumentLifecycle::InCompositingForSlimmingPaintV2); }); |
2532 | 2532 |
2533 // Detached frames can have no root graphics layer. | 2533 // Detached frames can have no root graphics layer. |
2534 if (GraphicsLayer* rootGraphicsLayer = layoutView()->layer()->graphicsLayerB
acking()) | 2534 if (GraphicsLayer* rootGraphicsLayer = layoutView()->layer()->graphicsLayerB
acking()) |
2535 rootGraphicsLayer->paintController()->commitNewDisplayItems(rootGraphics
Layer); | 2535 rootGraphicsLayer->paintController()->commitNewDisplayItems(); |
2536 | 2536 |
2537 forAllFrameViews([](FrameView& frameView) { frameView.lifecycle().advanceTo(
DocumentLifecycle::CompositingForSlimmingPaintV2Clean); }); | 2537 forAllFrameViews([](FrameView& frameView) { frameView.lifecycle().advanceTo(
DocumentLifecycle::CompositingForSlimmingPaintV2Clean); }); |
2538 } | 2538 } |
2539 | 2539 |
2540 void FrameView::updateFrameTimingRequestsIfNeeded() | 2540 void FrameView::updateFrameTimingRequestsIfNeeded() |
2541 { | 2541 { |
2542 GraphicsLayerFrameTimingRequests graphicsLayerTimingRequests; | 2542 GraphicsLayerFrameTimingRequests graphicsLayerTimingRequests; |
2543 // TODO(mpb) use a 'dirty' bit to not call this every time. | 2543 // TODO(mpb) use a 'dirty' bit to not call this every time. |
2544 collectFrameTimingRequestsRecursive(graphicsLayerTimingRequests); | 2544 collectFrameTimingRequestsRecursive(graphicsLayerTimingRequests); |
2545 | 2545 |
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4077 } | 4077 } |
4078 | 4078 |
4079 bool FrameView::canThrottleRendering() const | 4079 bool FrameView::canThrottleRendering() const |
4080 { | 4080 { |
4081 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) | 4081 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) |
4082 return false; | 4082 return false; |
4083 return m_hiddenForThrottling && m_crossOriginForThrottling; | 4083 return m_hiddenForThrottling && m_crossOriginForThrottling; |
4084 } | 4084 } |
4085 | 4085 |
4086 } // namespace blink | 4086 } // namespace blink |
OLD | NEW |