Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(254)

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp

Issue 2700123003: DO NOT COMMIT: Results of running old (current) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <memory> 7 #include <memory>
8 8
9 #include "base/test/test_simple_task_runner.h" 9 #include "base/test/test_simple_task_runner.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 cc::LayerTreeSettings settings = 85 cc::LayerTreeSettings settings =
86 WebLayerTreeViewImplForTesting::defaultLayerTreeSettings(); 86 WebLayerTreeViewImplForTesting::defaultLayerTreeSettings();
87 settings.single_thread_proxy_scheduler = false; 87 settings.single_thread_proxy_scheduler = false;
88 settings.use_layer_lists = true; 88 settings.use_layer_lists = true;
89 m_webLayerTreeView = 89 m_webLayerTreeView =
90 WTF::makeUnique<WebLayerTreeViewWithCompositorFrameSink>(settings); 90 WTF::makeUnique<WebLayerTreeViewWithCompositorFrameSink>(settings);
91 m_webLayerTreeView->setRootLayer(*m_paintArtifactCompositor->getWebLayer()); 91 m_webLayerTreeView->setRootLayer(*m_paintArtifactCompositor->getWebLayer());
92 } 92 }
93 93
94 const cc::PropertyTrees& propertyTrees() { 94 const cc::PropertyTrees& propertyTrees() {
95 return *m_webLayerTreeView->layerTreeHost() 95 return *m_webLayerTreeView->layerTreeHost()->property_trees();
96 ->property_trees();
97 } 96 }
98 97
99 int elementIdToEffectNodeIndex(CompositorElementId elementId) { 98 int elementIdToEffectNodeIndex(CompositorElementId elementId) {
100 return m_webLayerTreeView->layerTreeHost() 99 return m_webLayerTreeView->layerTreeHost()
101 ->property_trees() 100 ->property_trees()
102 ->element_id_to_effect_node_index[elementId]; 101 ->element_id_to_effect_node_index[elementId];
103 } 102 }
104 103
105 int elementIdToTransformNodeIndex(CompositorElementId elementId) { 104 int elementIdToTransformNodeIndex(CompositorElementId elementId) {
106 return m_webLayerTreeView->layerTreeHost() 105 return m_webLayerTreeView->layerTreeHost()
(...skipping 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after
1684 artifact 1683 artifact
1685 .chunk(TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(), 1684 .chunk(TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(),
1686 effect.get()) 1685 effect.get())
1687 .rectDrawing(FloatRect(100, 100, 200, 100), Color::black); 1686 .rectDrawing(FloatRect(100, 100, 200, 100), Color::black);
1688 update(artifact.build()); 1687 update(artifact.build());
1689 1688
1690 EXPECT_EQ(2, elementIdToEffectNodeIndex(expectedCompositorElementId)); 1689 EXPECT_EQ(2, elementIdToEffectNodeIndex(expectedCompositorElementId));
1691 } 1690 }
1692 1691
1693 } // namespace blink 1692 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698