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

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: rebase 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
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d1b518b44c8b1e250437f3be03c9eea062728c81..40650a62aa191c48644f16886250bf59421ce8f5 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -4696,19 +4696,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();
}
@@ -4767,19 +4761,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();
}
@@ -4838,19 +4826,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();
}
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698