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 "web/tests/sim/SimCompositor.h" | 5 #include "web/tests/sim/SimCompositor.h" |
6 | 6 |
7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
8 #include "core/layout/api/LayoutViewItem.h" | 8 #include "core/layout/api/LayoutViewItem.h" |
9 #include "core/layout/compositing/CompositedLayerMapping.h" | 9 #include "core/layout/compositing/CompositedLayerMapping.h" |
10 #include "core/layout/compositing/PaintLayerCompositor.h" | 10 #include "core/layout/compositing/PaintLayerCompositor.h" |
11 #include "core/paint/PaintLayer.h" | 11 #include "core/paint/PaintLayer.h" |
12 #include "platform/graphics/ContentLayerDelegate.h" | 12 #include "platform/graphics/ContentLayerDelegate.h" |
13 #include "platform/graphics/GraphicsLayer.h" | 13 #include "platform/graphics/GraphicsLayer.h" |
14 #include "public/platform/WebRect.h" | 14 #include "public/platform/WebRect.h" |
15 #include "web/WebLocalFrameImpl.h" | 15 #include "web/WebLocalFrameImpl.h" |
16 #include "web/WebViewImpl.h" | 16 #include "web/WebViewImpl.h" |
17 #include "web/tests/sim/SimDisplayItemList.h" | 17 #include "web/tests/sim/SimDisplayItemList.h" |
18 #include "wtf/CurrentTime.h" | 18 #include "wtf/CurrentTime.h" |
19 | 19 |
20 namespace blink { | 20 namespace blink { |
21 | 21 |
22 static void paintLayers(GraphicsLayer& layer, SimDisplayItemList& displayList) { | 22 static void paintLayers(GraphicsLayer& layer, SimDisplayItemList& displayList) { |
23 if (layer.drawsContent() && layer.hasTrackedPaintInvalidations()) { | 23 if (layer.drawsContent() && layer.hasTrackedRasterInvalidations()) { |
24 ContentLayerDelegate* delegate = layer.contentLayerDelegateForTesting(); | 24 ContentLayerDelegate* delegate = layer.contentLayerDelegateForTesting(); |
25 delegate->paintContents(&displayList); | 25 delegate->paintContents(&displayList); |
26 layer.resetTrackedPaintInvalidations(); | 26 layer.resetTrackedRasterInvalidations(); |
27 } | 27 } |
28 | 28 |
29 if (GraphicsLayer* maskLayer = layer.maskLayer()) | 29 if (GraphicsLayer* maskLayer = layer.maskLayer()) |
30 paintLayers(*maskLayer, displayList); | 30 paintLayers(*maskLayer, displayList); |
31 if (GraphicsLayer* contentsClippingMaskLayer = | 31 if (GraphicsLayer* contentsClippingMaskLayer = |
32 layer.contentsClippingMaskLayer()) | 32 layer.contentsClippingMaskLayer()) |
33 paintLayers(*contentsClippingMaskLayer, displayList); | 33 paintLayers(*contentsClippingMaskLayer, displayList); |
34 | 34 |
35 for (auto child : layer.children()) | 35 for (auto child : layer.children()) |
36 paintLayers(*child, displayList); | 36 paintLayers(*child, displayList); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 93 |
94 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); | 94 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); |
95 | 95 |
96 SimDisplayItemList displayList; | 96 SimDisplayItemList displayList; |
97 paintFrames(*root, displayList); | 97 paintFrames(*root, displayList); |
98 | 98 |
99 return displayList; | 99 return displayList; |
100 } | 100 } |
101 | 101 |
102 } // namespace blink | 102 } // namespace blink |
OLD | NEW |