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