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

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

Issue 2798513002: Revert of Make GeometryMapper fully static (Closed)
Patch Set: Created 3 years, 8 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 2852 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 2863
2864 void FrameView::updateGeometriesIfNeeded() { 2864 void FrameView::updateGeometriesIfNeeded() {
2865 if (!m_needsUpdateGeometries) 2865 if (!m_needsUpdateGeometries)
2866 return; 2866 return;
2867 2867
2868 m_needsUpdateGeometries = false; 2868 m_needsUpdateGeometries = false;
2869 2869
2870 updateGeometries(); 2870 updateGeometries();
2871 } 2871 }
2872 2872
2873 GeometryMapper& FrameView::geometryMapper() {
2874 DCHECK(RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled());
2875 DCHECK(lifecycle().state() >= DocumentLifecycle::InPrePaint);
2876
2877 if (m_frame->isLocalRoot()) {
2878 if (!m_geometryMapper)
2879 m_geometryMapper = GeometryMapper::create();
2880 return *m_geometryMapper.get();
2881 }
2882
2883 return frame().localFrameRoot()->view()->geometryMapper();
2884 }
2885
2873 void FrameView::updateAllLifecyclePhases() { 2886 void FrameView::updateAllLifecyclePhases() {
2874 frame().localFrameRoot()->view()->updateLifecyclePhasesInternal( 2887 frame().localFrameRoot()->view()->updateLifecyclePhasesInternal(
2875 DocumentLifecycle::PaintClean); 2888 DocumentLifecycle::PaintClean);
2876 } 2889 }
2877 2890
2878 // TODO(chrishtr): add a scrolling update lifecycle phase. 2891 // TODO(chrishtr): add a scrolling update lifecycle phase.
2879 void FrameView::updateLifecycleToCompositingCleanPlusScrolling() { 2892 void FrameView::updateLifecycleToCompositingCleanPlusScrolling() {
2880 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { 2893 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) {
2881 updateAllLifecyclePhasesExceptPaint(); 2894 updateAllLifecyclePhasesExceptPaint();
2882 } else { 2895 } else {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 // This frame can be throttled but not throttled, meaning we are not in an 3143 // This frame can be throttled but not throttled, meaning we are not in an
3131 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and 3144 // AllowThrottlingScope. Now this frame may contain dirty paint flags, and
3132 // we need to propagate the flags into the ancestor chain so that 3145 // we need to propagate the flags into the ancestor chain so that
3133 // PrePaintTreeWalk can reach this frame. 3146 // PrePaintTreeWalk can reach this frame.
3134 frameView.setNeedsPaintPropertyUpdate(); 3147 frameView.setNeedsPaintPropertyUpdate();
3135 } 3148 }
3136 }); 3149 });
3137 3150
3138 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { 3151 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) {
3139 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime"); 3152 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.PrePaint.UpdateTime");
3140 PrePaintTreeWalk().walk(*this); 3153 PrePaintTreeWalk(geometryMapper()).walk(*this);
3141 } 3154 }
3142 3155
3143 forAllNonThrottledFrameViews([](FrameView& frameView) { 3156 forAllNonThrottledFrameViews([](FrameView& frameView) {
3144 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean); 3157 frameView.lifecycle().advanceTo(DocumentLifecycle::PrePaintClean);
3145 }); 3158 });
3146 } 3159 }
3147 3160
3148 void FrameView::notifyPaint(const PaintController& paintController) const { 3161 void FrameView::notifyPaint(const PaintController& paintController) const {
3149 DCHECK(m_frame->document()); 3162 DCHECK(m_frame->document());
3150 PaintTiming::from(*m_frame->document()) 3163 PaintTiming::from(*m_frame->document())
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
3238 return; 3251 return;
3239 3252
3240 if (!m_paintArtifactCompositor) { 3253 if (!m_paintArtifactCompositor) {
3241 m_paintArtifactCompositor = PaintArtifactCompositor::create(); 3254 m_paintArtifactCompositor = PaintArtifactCompositor::create();
3242 page->chromeClient().attachRootLayer( 3255 page->chromeClient().attachRootLayer(
3243 m_paintArtifactCompositor->getWebLayer(), &frame()); 3256 m_paintArtifactCompositor->getWebLayer(), &frame());
3244 } 3257 }
3245 3258
3246 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime"); 3259 SCOPED_BLINK_UMA_HISTOGRAM_TIMER("Blink.Compositing.UpdateTime");
3247 3260
3261 DCHECK(m_geometryMapper.get());
3248 m_paintArtifactCompositor->update( 3262 m_paintArtifactCompositor->update(
3249 m_paintController->paintArtifact(), 3263 m_paintController->paintArtifact(),
3250 m_paintController->paintChunksRasterInvalidationTrackingMap(), 3264 m_paintController->paintChunksRasterInvalidationTrackingMap(),
3251 m_isStoringCompositedLayerDebugInfo); 3265 m_isStoringCompositedLayerDebugInfo, *m_geometryMapper);
3252 } 3266 }
3253 3267
3254 std::unique_ptr<JSONObject> FrameView::compositedLayersAsJSON( 3268 std::unique_ptr<JSONObject> FrameView::compositedLayersAsJSON(
3255 LayerTreeFlags flags) { 3269 LayerTreeFlags flags) {
3256 return frame() 3270 return frame()
3257 .localFrameRoot() 3271 .localFrameRoot()
3258 ->view() 3272 ->view()
3259 ->m_paintArtifactCompositor->layersAsJSON(flags); 3273 ->m_paintArtifactCompositor->layersAsJSON(flags);
3260 } 3274 }
3261 3275
(...skipping 1975 matching lines...) Expand 10 before | Expand all | Expand 10 after
5237 void FrameView::setAnimationHost( 5251 void FrameView::setAnimationHost(
5238 std::unique_ptr<CompositorAnimationHost> host) { 5252 std::unique_ptr<CompositorAnimationHost> host) {
5239 m_animationHost = std::move(host); 5253 m_animationHost = std::move(host);
5240 } 5254 }
5241 5255
5242 LayoutUnit FrameView::caretWidth() const { 5256 LayoutUnit FrameView::caretWidth() const {
5243 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5257 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5244 } 5258 }
5245 5259
5246 } // namespace blink 5260 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.h ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698