OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "platform/graphics/compositing/PaintArtifactCompositor.h" | 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h" |
6 | 6 |
7 #include "base/test/test_simple_task_runner.h" | 7 #include "base/test/test_simple_task_runner.h" |
8 #include "base/threading/thread_task_runner_handle.h" | 8 #include "base/threading/thread_task_runner_handle.h" |
9 #include "cc/layers/layer.h" | 9 #include "cc/layers/layer.h" |
10 #include "cc/test/fake_compositor_frame_sink.h" | 10 #include "cc/test/fake_compositor_frame_sink.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 ->property_trees() | 112 ->property_trees() |
113 ->element_id_to_scroll_node_index[elementId]; | 113 ->element_id_to_scroll_node_index[elementId]; |
114 } | 114 } |
115 | 115 |
116 const cc::TransformNode& transformNode(const cc::Layer* layer) { | 116 const cc::TransformNode& transformNode(const cc::Layer* layer) { |
117 return *propertyTrees().transform_tree.Node(layer->transform_tree_index()); | 117 return *propertyTrees().transform_tree.Node(layer->transform_tree_index()); |
118 } | 118 } |
119 | 119 |
120 void update(const PaintArtifact& artifact) { | 120 void update(const PaintArtifact& artifact) { |
121 GeometryMapper geometryMapper; | 121 GeometryMapper geometryMapper; |
122 m_paintArtifactCompositor->update(artifact, nullptr, false, geometryMapper); | 122 PaintArtifactCompositor::ScrollClientMap scrollClients; |
| 123 m_paintArtifactCompositor->update(artifact, nullptr, false, geometryMapper, |
| 124 scrollClients); |
123 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers(); | 125 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers(); |
124 } | 126 } |
125 | 127 |
126 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } | 128 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } |
127 | 129 |
128 size_t contentLayerCount() { | 130 size_t contentLayerCount() { |
129 return m_paintArtifactCompositor->getExtraDataForTesting() | 131 return m_paintArtifactCompositor->getExtraDataForTesting() |
130 ->contentLayers.size(); | 132 ->contentLayers.size(); |
131 } | 133 } |
132 | 134 |
(...skipping 1549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 artifact | 1684 artifact |
1683 .chunk(TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(), | 1685 .chunk(TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(), |
1684 effect.get()) | 1686 effect.get()) |
1685 .rectDrawing(FloatRect(100, 100, 200, 100), Color::black); | 1687 .rectDrawing(FloatRect(100, 100, 200, 100), Color::black); |
1686 update(artifact.build()); | 1688 update(artifact.build()); |
1687 | 1689 |
1688 EXPECT_EQ(2, elementIdToEffectNodeIndex(expectedCompositorElementId)); | 1690 EXPECT_EQ(2, elementIdToEffectNodeIndex(expectedCompositorElementId)); |
1689 } | 1691 } |
1690 | 1692 |
1691 } // namespace blink | 1693 } // namespace blink |
OLD | NEW |