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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2027803003: cc: Destroy pending_tree_duration_timer_ when reseting trees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 if (active_tree_) 1218 if (active_tree_)
1219 active_tree_->ClearLayers(); 1219 active_tree_->ClearLayers();
1220 active_tree_ = 1220 active_tree_ =
1221 LayerTreeImpl::create(this, active_tree()->page_scale_factor(), 1221 LayerTreeImpl::create(this, active_tree()->page_scale_factor(),
1222 active_tree()->top_controls_shown_ratio(), 1222 active_tree()->top_controls_shown_ratio(),
1223 active_tree()->elastic_overscroll()); 1223 active_tree()->elastic_overscroll());
1224 active_tree_->property_trees()->is_active = true; 1224 active_tree_->property_trees()->is_active = true;
1225 if (pending_tree_) 1225 if (pending_tree_)
1226 pending_tree_->ClearLayers(); 1226 pending_tree_->ClearLayers();
1227 pending_tree_ = nullptr; 1227 pending_tree_ = nullptr;
1228 pending_tree_duration_timer_ = nullptr;
1228 if (recycle_tree_) 1229 if (recycle_tree_)
1229 recycle_tree_->ClearLayers(); 1230 recycle_tree_->ClearLayers();
1230 recycle_tree_ = nullptr; 1231 recycle_tree_ = nullptr;
1231 } 1232 }
1232 1233
1233 size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const { 1234 size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const {
1234 return fps_counter_->current_frame_number(); 1235 return fps_counter_->current_frame_number();
1235 } 1236 }
1236 1237
1237 void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy( 1238 void LayerTreeHostImpl::UpdateTileManagerMemoryPolicy(
(...skipping 2809 matching lines...) Expand 10 before | Expand all | Expand 10 after
4047 const { 4048 const {
4048 return fixed_raster_scale_attempted_scale_change_history_.count() >= 4049 return fixed_raster_scale_attempted_scale_change_history_.count() >=
4049 kFixedRasterScaleAttemptedScaleChangeThreshold; 4050 kFixedRasterScaleAttemptedScaleChangeThreshold;
4050 } 4051 }
4051 4052
4052 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { 4053 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() {
4053 fixed_raster_scale_attempted_scale_change_history_.set(0); 4054 fixed_raster_scale_attempted_scale_change_history_.set(0);
4054 } 4055 }
4055 4056
4056 } // namespace cc 4057 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698