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

Unified Diff: cc/test/layer_tree_test.cc

Issue 2661523003: cc: Merge LayerTree into the LayerTreeHost. (Closed)
Patch Set: auto Created 3 years, 11 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/test/push_properties_counting_layer.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 149a01ba578bee63de00fbec4bb353d41bfc42e9..e3dc1e1045c4e68fe2a4e0bee6283990f1a8569f 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -67,9 +67,8 @@ void CreateVirtualViewportLayers(Layer* root_layer,
inner_viewport_scroll_layer->SetIsContainerForFixedPositionLayers(true);
outer_scroll_layer->SetIsContainerForFixedPositionLayers(true);
- host->GetLayerTree()->RegisterViewportLayers(
- overscroll_elasticity_layer, page_scale_layer,
- inner_viewport_scroll_layer, outer_scroll_layer);
+ host->RegisterViewportLayers(overscroll_elasticity_layer, page_scale_layer,
+ inner_viewport_scroll_layer, outer_scroll_layer);
}
void CreateVirtualViewportLayers(Layer* root_layer,
@@ -634,17 +633,17 @@ void LayerTreeTest::DoBeginTest() {
}
void LayerTreeTest::SetupTree() {
- if (!layer_tree()->root_layer()) {
+ if (!layer_tree_host()->root_layer()) {
scoped_refptr<Layer> root_layer = Layer::Create();
root_layer->SetBounds(gfx::Size(1, 1));
- layer_tree()->SetRootLayer(root_layer);
+ layer_tree_host()->SetRootLayer(root_layer);
}
- gfx::Size root_bounds = layer_tree()->root_layer()->bounds();
- gfx::Size device_root_bounds =
- gfx::ScaleToCeiledSize(root_bounds, layer_tree()->device_scale_factor());
- layer_tree()->SetViewportSize(device_root_bounds);
- layer_tree()->root_layer()->SetIsDrawable(true);
+ gfx::Size root_bounds = layer_tree_host()->root_layer()->bounds();
+ gfx::Size device_root_bounds = gfx::ScaleToCeiledSize(
+ root_bounds, layer_tree_host()->device_scale_factor());
+ layer_tree_host()->SetViewportSize(device_root_bounds);
+ layer_tree_host()->root_layer()->SetIsDrawable(true);
}
void LayerTreeTest::Timeout() {
@@ -702,7 +701,7 @@ void LayerTreeTest::DispatchSetNeedsRedraw() {
DCHECK(main_task_runner_->BelongsToCurrentThread());
if (layer_tree_host_)
DispatchSetNeedsRedrawRect(
- gfx::Rect(layer_tree_host_->GetLayerTree()->device_viewport_size()));
+ gfx::Rect(layer_tree_host_->device_viewport_size()));
}
void LayerTreeTest::DispatchSetNeedsRedrawRect(const gfx::Rect& damage_rect) {
@@ -813,8 +812,8 @@ LayerTreeTest::CreateDisplayOutputSurfaceOnThread(
}
void LayerTreeTest::DestroyLayerTreeHost() {
- if (layer_tree_host_ && layer_tree_host_->GetLayerTree()->root_layer())
- layer_tree_host_->GetLayerTree()->root_layer()->SetLayerTreeHost(NULL);
+ if (layer_tree_host_ && layer_tree_host_->root_layer())
+ layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
layer_tree_host_ = nullptr;
}
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/push_properties_counting_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698