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

Unified Diff: cc/test/layer_tree_test.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_tree_test.cc
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 9503c4273495e8abce353b003287ff637041cd15..9605854280d8c80e0f80177e3c2c680bde8c529f 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -46,55 +46,44 @@ void CreateVirtualViewportLayers(Layer* root_layer,
scoped_refptr<Layer> outer_scroll_layer,
const gfx::Size& inner_bounds,
const gfx::Size& outer_bounds,
- LayerTreeHost* host,
- const LayerSettings& layer_settings) {
- scoped_refptr<Layer> inner_viewport_container_layer =
- Layer::Create(layer_settings);
- scoped_refptr<Layer> inner_viewport_scroll_layer =
- Layer::Create(layer_settings);
- scoped_refptr<Layer> outer_viewport_container_layer =
- Layer::Create(layer_settings);
- scoped_refptr<Layer> page_scale_layer = Layer::Create(layer_settings);
-
- root_layer->AddChild(inner_viewport_container_layer);
- inner_viewport_container_layer->AddChild(page_scale_layer);
- page_scale_layer->AddChild(inner_viewport_scroll_layer);
- inner_viewport_scroll_layer->AddChild(outer_viewport_container_layer);
- outer_viewport_container_layer->AddChild(outer_scroll_layer);
-
- inner_viewport_scroll_layer->SetScrollClipLayerId(
- inner_viewport_container_layer->id());
- outer_scroll_layer->SetScrollClipLayerId(
- outer_viewport_container_layer->id());
-
- inner_viewport_container_layer->SetBounds(inner_bounds);
- inner_viewport_scroll_layer->SetBounds(outer_bounds);
- outer_viewport_container_layer->SetBounds(outer_bounds);
-
- inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true);
- outer_scroll_layer->SetIsContainerForFixedPositionLayers(true);
- host->RegisterViewportLayers(NULL, page_scale_layer,
- inner_viewport_scroll_layer,
- outer_scroll_layer);
+ LayerTreeHost* host) {
+ scoped_refptr<Layer> inner_viewport_container_layer = Layer::Create();
+ scoped_refptr<Layer> inner_viewport_scroll_layer = Layer::Create();
+ scoped_refptr<Layer> outer_viewport_container_layer = Layer::Create();
+ scoped_refptr<Layer> page_scale_layer = Layer::Create();
+
+ root_layer->AddChild(inner_viewport_container_layer);
+ inner_viewport_container_layer->AddChild(page_scale_layer);
+ page_scale_layer->AddChild(inner_viewport_scroll_layer);
+ inner_viewport_scroll_layer->AddChild(outer_viewport_container_layer);
+ outer_viewport_container_layer->AddChild(outer_scroll_layer);
+
+ inner_viewport_scroll_layer->SetScrollClipLayerId(
+ inner_viewport_container_layer->id());
+ outer_scroll_layer->SetScrollClipLayerId(
+ outer_viewport_container_layer->id());
+
+ inner_viewport_container_layer->SetBounds(inner_bounds);
+ inner_viewport_scroll_layer->SetBounds(outer_bounds);
+ outer_viewport_container_layer->SetBounds(outer_bounds);
+
+ inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true);
+ outer_scroll_layer->SetIsContainerForFixedPositionLayers(true);
+ host->RegisterViewportLayers(NULL, page_scale_layer,
+ inner_viewport_scroll_layer, outer_scroll_layer);
}
void CreateVirtualViewportLayers(Layer* root_layer,
const gfx::Size& inner_bounds,
const gfx::Size& outer_bounds,
const gfx::Size& scroll_bounds,
- LayerTreeHost* host,
- const LayerSettings& layer_settings) {
- scoped_refptr<Layer> outer_viewport_scroll_layer =
- Layer::Create(layer_settings);
-
- outer_viewport_scroll_layer->SetBounds(scroll_bounds);
- outer_viewport_scroll_layer->SetIsDrawable(true);
- CreateVirtualViewportLayers(root_layer,
- outer_viewport_scroll_layer,
- inner_bounds,
- outer_bounds,
- host,
- layer_settings);
+ LayerTreeHost* host) {
+ scoped_refptr<Layer> outer_viewport_scroll_layer = Layer::Create();
+
+ outer_viewport_scroll_layer->SetBounds(scroll_bounds);
+ outer_viewport_scroll_layer->SetIsDrawable(true);
+ CreateVirtualViewportLayers(root_layer, outer_viewport_scroll_layer,
+ inner_bounds, outer_bounds, host);
}
// Creates a SingleThreadProxy that notifies the supplied |test_hooks| of
@@ -746,7 +735,7 @@ void LayerTreeTest::DoBeginTest() {
void LayerTreeTest::SetupTree() {
if (!layer_tree_host_->root_layer()) {
- scoped_refptr<Layer> root_layer = Layer::Create(layer_settings_);
+ scoped_refptr<Layer> root_layer = Layer::Create();
root_layer->SetBounds(gfx::Size(1, 1));
layer_tree_host_->SetRootLayer(root_layer);
}
@@ -877,7 +866,6 @@ void LayerTreeTest::RunTest(CompositorMode mode, bool delegating_renderer) {
settings_.renderer_settings.refresh_rate = 200.0;
settings_.background_animation_rate = 200.0;
InitializeSettings(&settings_);
- InitializeLayerSettings(&layer_settings_);
main_task_runner_->PostTask(
FROM_HERE,
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/tiles/tile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698