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

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

Issue 1294233004: Subtree caching implementation in blink-core (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: s/setSelfNeedsRepaint/setNeedsRepaint/ Created 5 years, 4 months 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 | Annotate | Revision Log
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 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after
2456 if (LayoutView* view = layoutView()) { 2456 if (LayoutView* view = layoutView()) {
2457 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUp dateLayerTreeEvent::data(m_frame.get())); 2457 TRACE_EVENT1("devtools.timeline", "UpdateLayerTree", "data", InspectorUp dateLayerTreeEvent::data(m_frame.get()));
2458 2458
2459 // This was required for slimming paint v1 but is only temporarily 2459 // This was required for slimming paint v1 but is only temporarily
2460 // needed for slimming paint v2. 2460 // needed for slimming paint v2.
2461 view->compositor()->updateIfNeededRecursive(); 2461 view->compositor()->updateIfNeededRecursive();
2462 scrollContentsIfNeededRecursive(); 2462 scrollContentsIfNeededRecursive();
2463 2463
2464 ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean); 2464 ASSERT(lifecycle().state() >= DocumentLifecycle::CompositingClean);
2465 2465
2466 if (phases == AllPhases) { 2466 if (phases == OnlyUpToCompositingCleanPlusScrolling)
2467 invalidateTreeIfNeededRecursive(); 2467 return;
2468 2468
2469 if (view->compositor()->inCompositingMode()) 2469 invalidateTreeIfNeededRecursive();
2470 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded();
2471 2470
2472 updateCompositedSelectionIfNeeded(); 2471 if (view->compositor()->inCompositingMode())
2472 scrollingCoordinator()->updateAfterCompositingChangeIfNeeded();
2473 2473
2474 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 2474 updateCompositedSelectionIfNeeded();
2475 paintForSlimmingPaintV2();
2476 compositeForSlimmingPaintV2();
2477 }
2478 2475
2479 if (RuntimeEnabledFeatures::frameTimingSupportEnabled()) 2476 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
2480 updateFrameTimingRequestsIfNeeded(); 2477 paintForSlimmingPaintV2();
2478 if (phases == OnlyUpToPaintForSlimmingPaintV2Clean)
2479 return;
2480 compositeForSlimmingPaintV2();
2481 }
2481 2482
2482 ASSERT(!view->hasPendingSelection()); 2483 if (RuntimeEnabledFeatures::frameTimingSupportEnabled())
2483 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationCl ean 2484 updateFrameTimingRequestsIfNeeded();
2484 || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && lifecycl e().state() == DocumentLifecycle::CompositingForSlimmingPaintV2Clean)); 2485
2485 } 2486 ASSERT(!view->hasPendingSelection());
2487 ASSERT(lifecycle().state() == DocumentLifecycle::PaintInvalidationClean
2488 || (RuntimeEnabledFeatures::slimmingPaintV2Enabled() && lifecycle(). state() == DocumentLifecycle::CompositingForSlimmingPaintV2Clean));
2486 } 2489 }
2487 } 2490 }
2488 2491
2489 void FrameView::paintForSlimmingPaintV2() 2492 void FrameView::paintForSlimmingPaintV2()
2490 { 2493 {
2491 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 2494 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2492 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame())); 2495 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame()));
2493 2496
2494 LayoutView* view = layoutView(); 2497 LayoutView* view = layoutView();
2495 ASSERT(view); 2498 ASSERT(view);
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
3978 3981
3979 if (!graphicsLayer) 3982 if (!graphicsLayer)
3980 return; 3983 return;
3981 3984
3982 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect); 3985 DeprecatedPaintLayer::mapRectToPaintInvalidationBacking(localFrame->contentL ayoutObject(), paintInvalidationContainer, viewRect);
3983 3986
3984 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect))); 3987 graphicsLayerTimingRequests.add(graphicsLayer, Vector<std::pair<int64_t, Web Rect>>()).storedValue->value.append(std::make_pair(m_frame->frameID(), enclosing IntRect(viewRect)));
3985 } 3988 }
3986 3989
3987 } // namespace blink 3990 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698