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

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

Issue 2724083002: [SPv2] Decomposite otherwise-compositable animations that paint nothing. (Closed)
Patch Set: More include tweaks. Created 3 years, 9 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 ->property_trees() 114 ->property_trees()
115 ->element_id_to_scroll_node_index[elementId]; 115 ->element_id_to_scroll_node_index[elementId];
116 } 116 }
117 117
118 const cc::TransformNode& transformNode(const cc::Layer* layer) { 118 const cc::TransformNode& transformNode(const cc::Layer* layer) {
119 return *propertyTrees().transform_tree.Node(layer->transform_tree_index()); 119 return *propertyTrees().transform_tree.Node(layer->transform_tree_index());
120 } 120 }
121 121
122 void update(const PaintArtifact& artifact) { 122 void update(const PaintArtifact& artifact) {
123 std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create(); 123 std::unique_ptr<GeometryMapper> geometryMapper = GeometryMapper::create();
124 m_paintArtifactCompositor->update(artifact, nullptr, false, 124 CompositorElementIdSet elementIds;
125 *geometryMapper); 125 m_paintArtifactCompositor->update(artifact, nullptr, false, *geometryMapper,
126 elementIds);
126 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers(); 127 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers();
127 } 128 }
128 129
129 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } 130 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); }
130 131
131 size_t contentLayerCount() { 132 size_t contentLayerCount() {
132 return m_paintArtifactCompositor->getExtraDataForTesting() 133 return m_paintArtifactCompositor->getExtraDataForTesting()
133 ->contentLayers.size(); 134 ->contentLayers.size();
134 } 135 }
135 136
(...skipping 1843 matching lines...) Expand 10 before | Expand all | Expand 10 after
1979 EXPECT_EQ(gfx::Size(50, 50), layer3->bounds()); 1980 EXPECT_EQ(gfx::Size(50, 50), layer3->bounds());
1980 EXPECT_EQ(effectNode->id, layer3->effect_tree_index()); 1981 EXPECT_EQ(effectNode->id, layer3->effect_tree_index());
1981 1982
1982 const cc::Layer* layer4 = contentLayerAt(3); 1983 const cc::Layer* layer4 = contentLayerAt(3);
1983 EXPECT_EQ(gfx::Vector2dF(100.f, 0.f), layer4->offset_to_transform_parent()); 1984 EXPECT_EQ(gfx::Vector2dF(100.f, 0.f), layer4->offset_to_transform_parent());
1984 EXPECT_EQ(gfx::Size(150, 150), layer4->bounds()); 1985 EXPECT_EQ(gfx::Size(150, 150), layer4->bounds());
1985 EXPECT_EQ(1, layer4->effect_tree_index()); 1986 EXPECT_EQ(1, layer4->effect_tree_index());
1986 } 1987 }
1987 1988
1988 } // namespace blink 1989 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698