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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 | 70 |
71 // Delay constructing the compositor until after the feature is set. | 71 // Delay constructing the compositor until after the feature is set. |
72 m_paintArtifactCompositor = PaintArtifactCompositor::create(); | 72 m_paintArtifactCompositor = PaintArtifactCompositor::create(); |
73 m_paintArtifactCompositor->enableExtraDataForTesting(); | 73 m_paintArtifactCompositor->enableExtraDataForTesting(); |
74 | 74 |
75 cc::LayerTreeSettings settings = | 75 cc::LayerTreeSettings settings = |
76 WebLayerTreeViewImplForTesting::defaultLayerTreeSettings(); | 76 WebLayerTreeViewImplForTesting::defaultLayerTreeSettings(); |
77 settings.single_thread_proxy_scheduler = false; | 77 settings.single_thread_proxy_scheduler = false; |
78 settings.use_layer_lists = true; | 78 settings.use_layer_lists = true; |
79 m_webLayerTreeView = | 79 m_webLayerTreeView = |
80 makeUnique<WebLayerTreeViewWithCompositorFrameSink>(settings); | 80 WTF::makeUnique<WebLayerTreeViewWithCompositorFrameSink>(settings); |
81 m_webLayerTreeView->setRootLayer(*m_paintArtifactCompositor->getWebLayer()); | 81 m_webLayerTreeView->setRootLayer(*m_paintArtifactCompositor->getWebLayer()); |
82 } | 82 } |
83 | 83 |
84 void TearDown() override { m_featuresBackup.restore(); } | 84 void TearDown() override { m_featuresBackup.restore(); } |
85 | 85 |
86 const cc::PropertyTrees& propertyTrees() { | 86 const cc::PropertyTrees& propertyTrees() { |
87 return *m_webLayerTreeView->layerTreeHost() | 87 return *m_webLayerTreeView->layerTreeHost() |
88 ->GetLayerTree() | 88 ->GetLayerTree() |
89 ->property_trees(); | 89 ->property_trees(); |
90 } | 90 } |
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
719 scrollTree.current_scroll_offset(contentLayerAt(1)->id())); | 719 scrollTree.current_scroll_offset(contentLayerAt(1)->id())); |
720 | 720 |
721 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons & | 721 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons & |
722 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); | 722 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); |
723 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons & | 723 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons & |
724 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); | 724 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); |
725 } | 725 } |
726 | 726 |
727 } // namespace | 727 } // namespace |
728 } // namespace blink | 728 } // namespace blink |
OLD | NEW |