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/exported/WebViewBase.h" | 7 #include "core/exported/WebViewBase.h" |
| 8 #include "core/frame/LocalFrame.h" |
8 #include "core/frame/LocalFrameView.h" | 9 #include "core/frame/LocalFrameView.h" |
| 10 #include "core/frame/WebLocalFrameBase.h" |
9 #include "core/layout/api/LayoutViewItem.h" | 11 #include "core/layout/api/LayoutViewItem.h" |
10 #include "core/layout/compositing/CompositedLayerMapping.h" | 12 #include "core/layout/compositing/CompositedLayerMapping.h" |
11 #include "core/layout/compositing/PaintLayerCompositor.h" | 13 #include "core/layout/compositing/PaintLayerCompositor.h" |
12 #include "core/paint/PaintLayer.h" | 14 #include "core/paint/PaintLayer.h" |
13 #include "platform/graphics/ContentLayerDelegate.h" | 15 #include "platform/graphics/ContentLayerDelegate.h" |
14 #include "platform/graphics/GraphicsLayer.h" | 16 #include "platform/graphics/GraphicsLayer.h" |
15 #include "platform/wtf/CurrentTime.h" | 17 #include "platform/wtf/CurrentTime.h" |
16 #include "public/platform/WebRect.h" | 18 #include "public/platform/WebRect.h" |
17 #include "web/WebLocalFrameImpl.h" | |
18 #include "web/tests/sim/SimDisplayItemList.h" | 19 #include "web/tests/sim/SimDisplayItemList.h" |
19 | 20 |
20 namespace blink { | 21 namespace blink { |
21 | 22 |
22 static void PaintLayers(GraphicsLayer& layer, | 23 static void PaintLayers(GraphicsLayer& layer, |
23 SimDisplayItemList& display_list) { | 24 SimDisplayItemList& display_list) { |
24 if (layer.DrawsContent() && layer.HasTrackedRasterInvalidations()) { | 25 if (layer.DrawsContent() && layer.HasTrackedRasterInvalidations()) { |
25 ContentLayerDelegate* delegate = layer.ContentLayerDelegateForTesting(); | 26 ContentLayerDelegate* delegate = layer.ContentLayerDelegateForTesting(); |
26 delegate->PaintContents(&display_list); | 27 delegate->PaintContents(&display_list); |
27 layer.ResetTrackedRasterInvalidations(); | 28 layer.ResetTrackedRasterInvalidations(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 91 |
91 LocalFrame* root = web_view_->MainFrameImpl()->GetFrame(); | 92 LocalFrame* root = web_view_->MainFrameImpl()->GetFrame(); |
92 | 93 |
93 SimDisplayItemList display_list; | 94 SimDisplayItemList display_list; |
94 PaintFrames(*root, display_list); | 95 PaintFrames(*root, display_list); |
95 | 96 |
96 return display_list; | 97 return display_list; |
97 } | 98 } |
98 | 99 |
99 } // namespace blink | 100 } // namespace blink |
OLD | NEW |