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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 return *m_webLayerTreeView->layerTreeHost() | 84 return *m_webLayerTreeView->layerTreeHost() |
85 ->GetLayerTree() | 85 ->GetLayerTree() |
86 ->property_trees(); | 86 ->property_trees(); |
87 } | 87 } |
88 | 88 |
89 const cc::TransformNode& transformNode(const cc::Layer* layer) { | 89 const cc::TransformNode& transformNode(const cc::Layer* layer) { |
90 return *propertyTrees().transform_tree.Node(layer->transform_tree_index()); | 90 return *propertyTrees().transform_tree.Node(layer->transform_tree_index()); |
91 } | 91 } |
92 | 92 |
93 void update(const PaintArtifact& artifact) { | 93 void update(const PaintArtifact& artifact) { |
94 m_paintArtifactCompositor->update(artifact); | 94 m_paintArtifactCompositor->update(artifact, nullptr); |
95 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers(); | 95 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers(); |
96 } | 96 } |
97 | 97 |
98 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } | 98 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } |
99 | 99 |
100 size_t contentLayerCount() { | 100 size_t contentLayerCount() { |
101 return m_paintArtifactCompositor->getExtraDataForTesting() | 101 return m_paintArtifactCompositor->getExtraDataForTesting() |
102 ->contentLayers.size(); | 102 ->contentLayers.size(); |
103 } | 103 } |
104 | 104 |
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 scrollTree.current_scroll_offset(contentLayerAt(1)->id())); | 652 scrollTree.current_scroll_offset(contentLayerAt(1)->id())); |
653 | 653 |
654 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons & | 654 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons & |
655 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); | 655 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); |
656 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons & | 656 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons & |
657 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); | 657 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); |
658 } | 658 } |
659 | 659 |
660 } // namespace | 660 } // namespace |
661 } // namespace blink | 661 } // namespace blink |
OLD | NEW |