Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 1416053003: Let synchronized painting generate correct paint invalidation rects (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698