Commit 4f82fb79 authored by Weiliang Chen's avatar Weiliang Chen Committed by Commit Bot

cc: Remove GetTree from PictureLayerImpl, Use Existing Function

LayerImpl has IsActive function to check if layer is on active tree.
Use that function instead of the PictureLayerImpl's GetTree function.

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: I169e9ccbca359cc56cb48a7b3587d8bd2f5b753c
Reviewed-on: https://chromium-review.googlesource.com/967268
Commit-Queue: weiliangc <weiliangc@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543951}
parent 43973749
......@@ -189,7 +189,8 @@ void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) {
const LayerTreeSettings& settings = layer->layer_tree_impl()->settings();
std::unique_ptr<PictureLayerTilingSet> tiling_set =
PictureLayerTilingSet::Create(
layer->GetTree(), &client, settings.tiling_interest_area_padding,
layer->IsActive() ? ACTIVE_TREE : PENDING_TREE, &client,
settings.tiling_interest_area_padding,
settings.skewport_target_time_in_seconds,
settings.skewport_extrapolation_limit_in_screen_pixels,
settings.max_preraster_distance_in_screen_pixels);
......
......@@ -86,7 +86,8 @@ class CC_EXPORT LayerImpl {
int id() const { return layer_id_; }
// Interactions with attached animations.
// Whether this layer is on the active tree, return false if it's on the
// pending tree.
bool IsActive() const;
void SetHasTransformNode(bool val) { has_transform_node_ = val; }
......
......@@ -1514,7 +1514,8 @@ std::unique_ptr<PictureLayerTilingSet>
PictureLayerImpl::CreatePictureLayerTilingSet() {
const LayerTreeSettings& settings = layer_tree_impl()->settings();
return PictureLayerTilingSet::Create(
GetTree(), this, settings.tiling_interest_area_padding,
IsActive() ? ACTIVE_TREE : PENDING_TREE, this,
settings.tiling_interest_area_padding,
layer_tree_impl()->use_gpu_rasterization()
? settings.gpu_rasterization_skewport_target_time_in_seconds
: settings.skewport_target_time_in_seconds,
......@@ -1634,10 +1635,6 @@ void PictureLayerImpl::RunMicroBenchmark(MicroBenchmarkImpl* benchmark) {
benchmark->RunOnLayer(this);
}
WhichTree PictureLayerImpl::GetTree() const {
return layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE;
}
bool PictureLayerImpl::IsOnActiveOrPendingTree() const {
return !layer_tree_impl()->IsRecycleTree();
}
......
......@@ -78,7 +78,6 @@ class CC_EXPORT PictureLayerImpl
bool UpdateTiles();
// Returns true if the LCD state changed.
bool UpdateCanUseLCDTextAfterCommit();
WhichTree GetTree() const;
// Mask-related functions.
void GetContentsResourceId(viz::ResourceId* resource_id,
......
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