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

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

Issue 1407543003: Preliminary paint property walk implementation for SPv2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor bug fix (perspective does not clear paint offset). switch test to unit test style. add a few … Created 5 years, 2 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
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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 #include "core/loader/FrameLoader.h" 69 #include "core/loader/FrameLoader.h"
70 #include "core/loader/FrameLoaderClient.h" 70 #include "core/loader/FrameLoaderClient.h"
71 #include "core/page/AutoscrollController.h" 71 #include "core/page/AutoscrollController.h"
72 #include "core/page/ChromeClient.h" 72 #include "core/page/ChromeClient.h"
73 #include "core/page/FocusController.h" 73 #include "core/page/FocusController.h"
74 #include "core/page/FrameTree.h" 74 #include "core/page/FrameTree.h"
75 #include "core/page/Page.h" 75 #include "core/page/Page.h"
76 #include "core/page/scrolling/ScrollingCoordinator.h" 76 #include "core/page/scrolling/ScrollingCoordinator.h"
77 #include "core/paint/FramePainter.h" 77 #include "core/paint/FramePainter.h"
78 #include "core/paint/PaintLayer.h" 78 #include "core/paint/PaintLayer.h"
79 #include "core/paint/PaintPropertyTreeBuilder.h"
79 #include "core/style/ComputedStyle.h" 80 #include "core/style/ComputedStyle.h"
80 #include "core/svg/SVGDocumentExtensions.h" 81 #include "core/svg/SVGDocumentExtensions.h"
81 #include "core/svg/SVGSVGElement.h" 82 #include "core/svg/SVGSVGElement.h"
82 #include "platform/HostWindow.h" 83 #include "platform/HostWindow.h"
83 #include "platform/RuntimeEnabledFeatures.h" 84 #include "platform/RuntimeEnabledFeatures.h"
84 #include "platform/ScriptForbiddenScope.h" 85 #include "platform/ScriptForbiddenScope.h"
85 #include "platform/TraceEvent.h" 86 #include "platform/TraceEvent.h"
86 #include "platform/TracedValue.h" 87 #include "platform/TracedValue.h"
87 #include "platform/fonts/FontCache.h" 88 #include "platform/fonts/FontCache.h"
88 #include "platform/geometry/DoubleRect.h" 89 #include "platform/geometry/DoubleRect.h"
(...skipping 2376 matching lines...) Expand 10 before | Expand all | Expand 10 after
2465 } 2466 }
2466 } 2467 }
2467 2468
2468 updateViewportIntersectionsForSubtree(); 2469 updateViewportIntersectionsForSubtree();
2469 } 2470 }
2470 2471
2471 void FrameView::updatePaintProperties() 2472 void FrameView::updatePaintProperties()
2472 { 2473 {
2473 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled()); 2474 ASSERT(RuntimeEnabledFeatures::slimmingPaintV2Enabled());
2474 2475
2475 forAllFrameViews([](FrameView& frameView) { frameView.lifecycle().advanceTo( DocumentLifecycle::InUpdatePaintProperties); }); 2476 lifecycle().advanceTo(DocumentLifecycle::InUpdatePaintProperties);
2476 // TODO(pdr): Calculate the paint properties by walking the layout tree. 2477 PaintPropertyTreeBuilder().buildPropertyTrees(*this);
2477 forAllFrameViews([](FrameView& frameView) { frameView.lifecycle().advanceTo( DocumentLifecycle::UpdatePaintPropertiesClean); }); 2478 lifecycle().advanceTo(DocumentLifecycle::UpdatePaintPropertiesClean);
2478 } 2479 }
2479 2480
2480 void FrameView::synchronizedPaint(const LayoutRect* interestRect) 2481 void FrameView::synchronizedPaint(const LayoutRect* interestRect)
2481 { 2482 {
2482 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled()); 2483 ASSERT(RuntimeEnabledFeatures::slimmingPaintSynchronizedPaintingEnabled());
2483 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame())); 2484 ASSERT(frame() == page()->mainFrame() || (!frame().tree().parent()->isLocalF rame()));
2484 2485
2485 LayoutView* view = layoutView(); 2486 LayoutView* view = layoutView();
2486 ASSERT(view); 2487 ASSERT(view);
2487 // TODO(chrishtr): figure out if there can be any GraphicsLayer above this o ne that draws content. 2488 // TODO(chrishtr): figure out if there can be any GraphicsLayer above this o ne that draws content.
(...skipping 1583 matching lines...) Expand 10 before | Expand all | Expand 10 after
4071 } 4072 }
4072 4073
4073 bool FrameView::canThrottleRendering() const 4074 bool FrameView::canThrottleRendering() const
4074 { 4075 {
4075 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled()) 4076 if (!RuntimeEnabledFeatures::renderingPipelineThrottlingEnabled())
4076 return false; 4077 return false;
4077 return m_hiddenForThrottling && m_crossOriginForThrottling; 4078 return m_hiddenForThrottling && m_crossOriginForThrottling;
4078 } 4079 }
4079 4080
4080 } // namespace blink 4081 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698