| 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 { | 23 { |
| 24 if (layer.drawsContent() && layer.hasTrackedPaintInvalidations()) { | 24 if (layer.drawsContent() && layer.hasTrackedRasterInvalidations()) { |
| 25 ContentLayerDelegate* delegate = layer.contentLayerDelegateForTesting(); | 25 ContentLayerDelegate* delegate = layer.contentLayerDelegateForTesting(); |
| 26 delegate->paintContents(&displayList); | 26 delegate->paintContents(&displayList); |
| 27 layer.resetTrackedPaintInvalidations(); | 27 layer.resetTrackedRasterInvalidations(); |
| 28 } | 28 } |
| 29 | 29 |
| 30 if (GraphicsLayer* maskLayer = layer.maskLayer()) | 30 if (GraphicsLayer* maskLayer = layer.maskLayer()) |
| 31 paintLayers(*maskLayer, displayList); | 31 paintLayers(*maskLayer, displayList); |
| 32 if (GraphicsLayer* contentsClippingMaskLayer = layer.contentsClippingMaskLay
er()) | 32 if (GraphicsLayer* contentsClippingMaskLayer = layer.contentsClippingMaskLay
er()) |
| 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); |
| 37 } | 37 } |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); | 103 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); |
| 104 | 104 |
| 105 SimDisplayItemList displayList; | 105 SimDisplayItemList displayList; |
| 106 paintFrames(*root, displayList); | 106 paintFrames(*root, displayList); |
| 107 | 107 |
| 108 return displayList; | 108 return displayList; |
| 109 } | 109 } |
| 110 | 110 |
| 111 } // namespace blink | 111 } // namespace blink |
| OLD | NEW |