diff options
author | enne <enne@chromium.org> | 2015-07-13 17:04:53 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-14 00:05:44 +0000 |
commit | 7b2a217751cdfbcfcf6dcf9793cb428082939da7 (patch) | |
tree | 8d15dfd5a2a523f8fdd8256193eb11a452d5dc02 /cc/test | |
parent | 703f6dd2ce48c4ab8e6ea4097c54adc6e034e5b6 (diff) | |
download | chromium_src-7b2a217751cdfbcfcf6dcf9793cb428082939da7.zip chromium_src-7b2a217751cdfbcfcf6dcf9793cb428082939da7.tar.gz chromium_src-7b2a217751cdfbcfcf6dcf9793cb428082939da7.tar.bz2 |
cc: Convert backface LTHCommon tests from Layer->LayerImpl
R=ajuma@chromium.org
BUG=502041
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1221273003
Cr-Commit-Position: refs/heads/master@{#338599}
Diffstat (limited to 'cc/test')
-rw-r--r-- | cc/test/layer_tree_host_common_test.cc | 11 | ||||
-rw-r--r-- | cc/test/layer_tree_host_common_test.h | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/cc/test/layer_tree_host_common_test.cc b/cc/test/layer_tree_host_common_test.cc index 81983ca..1cde940 100644 --- a/cc/test/layer_tree_host_common_test.cc +++ b/cc/test/layer_tree_host_common_test.cc @@ -102,12 +102,11 @@ void LayerTreeHostCommonTestBase:: gfx::Size device_viewport_size = gfx::Size(root_layer->bounds().width() * device_scale_factor, root_layer->bounds().height() * device_scale_factor); - LayerList update_layer_list; BuildPropertyTreesAndComputeVisibleRects( root_layer, page_scale_layer, inner_viewport_scroll_layer, outer_viewport_scroll_layer, page_scale_factor, device_scale_factor, gfx::Rect(device_viewport_size), identity_transform, - root_layer->layer_tree_host()->property_trees(), &update_layer_list); + root_layer->layer_tree_host()->property_trees(), &update_layer_list_); } void LayerTreeHostCommonTestBase:: @@ -170,6 +169,14 @@ void LayerTreeHostCommonTestBase::ExecuteCalculateDrawProperties( LayerTreeHostCommon::CalculateDrawProperties(&inputs); } +bool LayerTreeHostCommonTestBase::UpdateLayerListContains(int id) const { + for (size_t i = 0; i < update_layer_list_.size(); ++i) { + if (update_layer_list_[i]->id() == id) + return true; + } + return false; +} + LayerTreeHostCommonTest::LayerTreeHostCommonTest() : LayerTreeHostCommonTestBase(LayerTreeSettings()) { } diff --git a/cc/test/layer_tree_host_common_test.h b/cc/test/layer_tree_host_common_test.h index ad08295..a838a2c 100644 --- a/cc/test/layer_tree_host_common_test.h +++ b/cc/test/layer_tree_host_common_test.h @@ -119,6 +119,9 @@ class LayerTreeHostCommonTestBase : public LayerTestCommon::LayerImplTest { return render_surface_layer_list_impl_.get(); } + const LayerList& update_layer_list() const { return update_layer_list_; } + bool UpdateLayerListContains(int id) const; + int render_surface_layer_list_count() const { return render_surface_layer_list_count_; } @@ -128,6 +131,7 @@ class LayerTreeHostCommonTestBase : public LayerTestCommon::LayerImplTest { private: scoped_ptr<RenderSurfaceLayerList> render_surface_layer_list_; scoped_ptr<std::vector<LayerImpl*>> render_surface_layer_list_impl_; + LayerList update_layer_list_; LayerSettings layer_settings_; int render_surface_layer_list_count_; |