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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 290573007: cc: Move gpu rasterization flag from tree-impl to tree-host-impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated unittests Created 6 years, 7 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
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 52ac0f66821c8e9c1ed8530bd53a0db9047761d4..84dce3f8b060c84e35bb090523d12e12ace5cbfd 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -5045,19 +5045,13 @@ class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest {
}
virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- LayerImpl* root = host_impl->pending_tree()->root_layer();
- PictureLayerImpl* layer_impl =
- static_cast<PictureLayerImpl*>(root->children()[0]);
-
- EXPECT_FALSE(layer_impl->use_gpu_rasterization());
+ EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization());
+ EXPECT_FALSE(host_impl->use_gpu_rasterization());
}
virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- LayerImpl* root = host_impl->active_tree()->root_layer();
- PictureLayerImpl* layer_impl =
- static_cast<PictureLayerImpl*>(root->children()[0]);
-
- EXPECT_FALSE(layer_impl->use_gpu_rasterization());
+ EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization());
+ EXPECT_FALSE(host_impl->use_gpu_rasterization());
EndTest();
}
@@ -5116,19 +5110,13 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest {
}
virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- LayerImpl* root = host_impl->pending_tree()->root_layer();
- PictureLayerImpl* layer_impl =
- static_cast<PictureLayerImpl*>(root->children()[0]);
-
- EXPECT_FALSE(layer_impl->use_gpu_rasterization());
+ EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization());
+ EXPECT_FALSE(host_impl->use_gpu_rasterization());
}
virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- LayerImpl* root = host_impl->active_tree()->root_layer();
- PictureLayerImpl* layer_impl =
- static_cast<PictureLayerImpl*>(root->children()[0]);
-
- EXPECT_FALSE(layer_impl->use_gpu_rasterization());
+ EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization());
+ EXPECT_FALSE(host_impl->use_gpu_rasterization());
EndTest();
}
@@ -5187,19 +5175,13 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest {
}
virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- LayerImpl* root = host_impl->pending_tree()->root_layer();
- PictureLayerImpl* layer_impl =
- static_cast<PictureLayerImpl*>(root->children()[0]);
-
- EXPECT_TRUE(layer_impl->use_gpu_rasterization());
+ EXPECT_TRUE(host_impl->pending_tree()->use_gpu_rasterization());
+ EXPECT_TRUE(host_impl->use_gpu_rasterization());
}
virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
- LayerImpl* root = host_impl->active_tree()->root_layer();
- PictureLayerImpl* layer_impl =
- static_cast<PictureLayerImpl*>(root->children()[0]);
-
- EXPECT_TRUE(layer_impl->use_gpu_rasterization());
+ EXPECT_TRUE(host_impl->active_tree()->use_gpu_rasterization());
+ EXPECT_TRUE(host_impl->use_gpu_rasterization());
EndTest();
}

Powered by Google App Engine
This is Rietveld 408576698