Commit 5e350ca0 authored by Weiliang Chen's avatar Weiliang Chen Committed by Commit Bot

cc: Remove test only function checking for copy request on LayerImpl

This function is only called on tests, and it goes to effect tree to
get correct information. Remove this from LayerImpl.

R=danakj

Bug: 822873
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel
Change-Id: I21e13b32de44a5a5c50fbdc5029f2fe620a17e09
Reviewed-on: https://chromium-review.googlesource.com/967089Reviewed-by: default avatardanakj <danakj@chromium.org>
Commit-Queue: weiliangc <weiliangc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543947}
parent b9ba95a8
...@@ -494,10 +494,6 @@ void LayerImpl::ResetChangeTracking() { ...@@ -494,10 +494,6 @@ void LayerImpl::ResetChangeTracking() {
damage_rect_.SetRect(0, 0, 0, 0); damage_rect_.SetRect(0, 0, 0, 0);
} }
bool LayerImpl::has_copy_requests_in_target_subtree() {
return GetEffectTree().Node(effect_tree_index())->subtree_has_copy_request;
}
bool LayerImpl::IsActive() const { bool LayerImpl::IsActive() const {
return layer_tree_impl_->IsActiveTree(); return layer_tree_impl_->IsActiveTree();
} }
......
...@@ -416,8 +416,6 @@ class CC_EXPORT LayerImpl { ...@@ -416,8 +416,6 @@ class CC_EXPORT LayerImpl {
virtual gfx::Rect GetEnclosingRectInTargetSpace() const; virtual gfx::Rect GetEnclosingRectInTargetSpace() const;
bool has_copy_requests_in_target_subtree();
void UpdatePropertyTreeForAnimationIfNeeded(ElementId element_id); void UpdatePropertyTreeForAnimationIfNeeded(ElementId element_id);
float GetIdealContentsScale() const; float GetIdealContentsScale() const;
......
...@@ -4885,10 +4885,16 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) { ...@@ -4885,10 +4885,16 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
inputs.can_adjust_raster_scales = true; inputs.can_adjust_raster_scales = true;
LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs); LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs);
EXPECT_TRUE(root_layer->has_copy_requests_in_target_subtree()); auto& effect_tree =
EXPECT_TRUE(copy_grand_parent_layer->has_copy_requests_in_target_subtree()); root_layer->layer_tree_impl()->property_trees()->effect_tree;
EXPECT_TRUE(copy_parent_layer->has_copy_requests_in_target_subtree()); EXPECT_TRUE(effect_tree.Node(root_layer->effect_tree_index())
EXPECT_TRUE(copy_layer->has_copy_requests_in_target_subtree()); ->subtree_has_copy_request);
EXPECT_TRUE(effect_tree.Node(copy_grand_parent_layer->effect_tree_index())
->subtree_has_copy_request);
EXPECT_TRUE(effect_tree.Node(copy_parent_layer->effect_tree_index())
->subtree_has_copy_request);
EXPECT_TRUE(effect_tree.Node(copy_layer->effect_tree_index())
->subtree_has_copy_request);
// We should have four render surfaces, one for the root, one for the grand // We should have four render surfaces, one for the root, one for the grand
// parent since it has opacity and two drawing descendants, one for the parent // parent since it has opacity and two drawing descendants, one for the parent
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment