Skip to content

Commit

Permalink
cc: Remove test only function checking for copy request on LayerImpl
Browse files Browse the repository at this point in the history
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/967089
Reviewed-by: danakj <danakj@chromium.org>
Commit-Queue: weiliangc <weiliangc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543947}
  • Loading branch information
weiliangc authored and Commit Bot committed Mar 17, 2018
1 parent b9ba95a commit 5e350ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 0 additions & 4 deletions cc/layers/layer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,6 @@ void LayerImpl::ResetChangeTracking() {
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 {
return layer_tree_impl_->IsActiveTree();
}
Expand Down
2 changes: 0 additions & 2 deletions cc/layers/layer_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,6 @@ class CC_EXPORT LayerImpl {

virtual gfx::Rect GetEnclosingRectInTargetSpace() const;

bool has_copy_requests_in_target_subtree();

void UpdatePropertyTreeForAnimationIfNeeded(ElementId element_id);

float GetIdealContentsScale() const;
Expand Down
14 changes: 10 additions & 4 deletions cc/trees/layer_tree_host_common_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4885,10 +4885,16 @@ TEST_F(LayerTreeHostCommonTest, SubtreeHiddenWithCopyRequest) {
inputs.can_adjust_raster_scales = true;
LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs);

EXPECT_TRUE(root_layer->has_copy_requests_in_target_subtree());
EXPECT_TRUE(copy_grand_parent_layer->has_copy_requests_in_target_subtree());
EXPECT_TRUE(copy_parent_layer->has_copy_requests_in_target_subtree());
EXPECT_TRUE(copy_layer->has_copy_requests_in_target_subtree());
auto& effect_tree =
root_layer->layer_tree_impl()->property_trees()->effect_tree;
EXPECT_TRUE(effect_tree.Node(root_layer->effect_tree_index())
->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
// parent since it has opacity and two drawing descendants, one for the parent
Expand Down

0 comments on commit 5e350ca

Please sign in to comment.