| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/PrePaintTreeWalk.h" | 5 #include "core/paint/PrePaintTreeWalk.h" |
| 6 | 6 |
| 7 #include "core/dom/DocumentLifecycle.h" | 7 #include "core/dom/DocumentLifecycle.h" |
| 8 #include "core/frame/FrameView.h" | 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/LocalFrame.h" | 9 #include "core/frame/LocalFrame.h" |
| 10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 10 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // block or stacking ancestor. | 42 // block or stacking ancestor. |
| 43 PaintLayer* ancestorOverflowPaintLayer; | 43 PaintLayer* ancestorOverflowPaintLayer; |
| 44 PaintLayer* ancestorTransformedOrRootPaintLayer; | 44 PaintLayer* ancestorTransformedOrRootPaintLayer; |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 void PrePaintTreeWalk::walk(FrameView& rootFrame) { | 47 void PrePaintTreeWalk::walk(FrameView& rootFrame) { |
| 48 DCHECK(rootFrame.frame().document()->lifecycle().state() == | 48 DCHECK(rootFrame.frame().document()->lifecycle().state() == |
| 49 DocumentLifecycle::InPrePaint); | 49 DocumentLifecycle::InPrePaint); |
| 50 | 50 |
| 51 PrePaintTreeWalkContext initialContext(m_geometryMapper); | 51 PrePaintTreeWalkContext initialContext(m_geometryMapper); |
| 52 m_propertyTreeBuilder.setupInitialContext(*initialContext.treeBuilderContext); | |
| 53 initialContext.ancestorTransformedOrRootPaintLayer = | 52 initialContext.ancestorTransformedOrRootPaintLayer = |
| 54 rootFrame.layoutView()->layer(); | 53 rootFrame.layoutView()->layer(); |
| 55 | 54 |
| 56 // GeometryMapper depends on paint properties. | 55 // GeometryMapper depends on paint properties. |
| 57 if (rootFrame.needsPaintPropertyUpdate() || | 56 if (rootFrame.needsPaintPropertyUpdate() || |
| 58 (rootFrame.layoutView() && | 57 (rootFrame.layoutView() && |
| 59 !shouldEndWalkBefore(*rootFrame.layoutView(), initialContext))) | 58 !shouldEndWalkBefore(*rootFrame.layoutView(), initialContext))) |
| 60 m_geometryMapper.clearCache(); | 59 m_geometryMapper.clearCache(); |
| 61 | 60 |
| 62 walk(rootFrame, initialContext); | 61 walk(rootFrame, initialContext); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 roundedIntPoint(context.treeBuilderContext->current.paintOffset); | 280 roundedIntPoint(context.treeBuilderContext->current.paintOffset); |
| 282 walk(*toFrameView(frameViewBase), context); | 281 walk(*toFrameView(frameViewBase), context); |
| 283 } | 282 } |
| 284 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). | 283 // TODO(pdr): Investigate RemoteFrameView (crbug.com/579281). |
| 285 } | 284 } |
| 286 | 285 |
| 287 object.getMutableForPainting().clearPaintFlags(); | 286 object.getMutableForPainting().clearPaintFlags(); |
| 288 } | 287 } |
| 289 | 288 |
| 290 } // namespace blink | 289 } // namespace blink |
| OLD | NEW |