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

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

Issue 2251143002: cc: Reland Move data to LayerTree from LayerTreeHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix? Created 4 years, 4 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 "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_output_surface.h" 10 #include "cc/test/fake_output_surface.h"
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 cc::LayerTreeSettings settings = WebLayerTreeViewImplForTesting::default LayerTreeSettings(); 409 cc::LayerTreeSettings settings = WebLayerTreeViewImplForTesting::default LayerTreeSettings();
410 settings.single_thread_proxy_scheduler = false; 410 settings.single_thread_proxy_scheduler = false;
411 settings.use_layer_lists = true; 411 settings.use_layer_lists = true;
412 m_webLayerTreeView = wrapUnique(new WebLayerTreeViewWithOutputSurface(se ttings)); 412 m_webLayerTreeView = wrapUnique(new WebLayerTreeViewWithOutputSurface(se ttings));
413 m_webLayerTreeView->setRootLayer(*getPaintArtifactCompositor().getWebLay er()); 413 m_webLayerTreeView->setRootLayer(*getPaintArtifactCompositor().getWebLay er());
414 } 414 }
415 415
416 const cc::PropertyTrees& propertyTrees() 416 const cc::PropertyTrees& propertyTrees()
417 { 417 {
418 return *m_webLayerTreeView->layerTreeHost()->property_trees(); 418 return *m_webLayerTreeView->layerTreeHost()->GetLayerTree()->property_tr ees();
419 } 419 }
420 420
421 const cc::TransformNode& transformNode(const cc::Layer* layer) 421 const cc::TransformNode& transformNode(const cc::Layer* layer)
422 { 422 {
423 return *propertyTrees().transform_tree.Node(layer->transform_tree_index( )); 423 return *propertyTrees().transform_tree.Node(layer->transform_tree_index( ));
424 } 424 }
425 425
426 void update(const PaintArtifact& artifact) 426 void update(const PaintArtifact& artifact)
427 { 427 {
428 PaintArtifactCompositorTest::update(artifact); 428 PaintArtifactCompositorTest::update(artifact);
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 EXPECT_EQ(convertedDummyRootEffect.id, convertedEffect3.parent_id); 850 EXPECT_EQ(convertedDummyRootEffect.id, convertedEffect3.parent_id);
851 EXPECT_FLOAT_EQ(0.2, convertedEffect3.opacity); 851 EXPECT_FLOAT_EQ(0.2, convertedEffect3.opacity);
852 852
853 EXPECT_EQ(convertedEffect2.id, contentLayerAt(0)->effect_tree_index()); 853 EXPECT_EQ(convertedEffect2.id, contentLayerAt(0)->effect_tree_index());
854 EXPECT_EQ(convertedEffect1.id, contentLayerAt(1)->effect_tree_index()); 854 EXPECT_EQ(convertedEffect1.id, contentLayerAt(1)->effect_tree_index());
855 EXPECT_EQ(convertedEffect3.id, contentLayerAt(2)->effect_tree_index()); 855 EXPECT_EQ(convertedEffect3.id, contentLayerAt(2)->effect_tree_index());
856 } 856 }
857 857
858 } // namespace 858 } // namespace
859 } // namespace blink 859 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698