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

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

Issue 1766053002: Clean LayerImpl's scroll offset callers in unit tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove transform tree update setting Created 4 years, 9 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 | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 248
249 DCHECK(task_runner_provider_->IsImplThread()); 249 DCHECK(task_runner_provider_->IsImplThread());
250 DidVisibilityChange(this, visible_); 250 DidVisibilityChange(this, visible_);
251 251
252 SetDebugState(settings.initial_debug_state); 252 SetDebugState(settings.initial_debug_state);
253 253
254 // LTHI always has an active tree. 254 // LTHI always has an active tree.
255 active_tree_ = 255 active_tree_ =
256 LayerTreeImpl::create(this, new SyncedProperty<ScaleGroup>(), 256 LayerTreeImpl::create(this, new SyncedProperty<ScaleGroup>(),
257 new SyncedTopControls, new SyncedElasticOverscroll); 257 new SyncedTopControls, new SyncedElasticOverscroll);
258 active_tree_->property_trees()->is_active = true;
258 259
259 viewport_ = Viewport::Create(this); 260 viewport_ = Viewport::Create(this);
260 261
261 TRACE_EVENT_OBJECT_CREATED_WITH_ID( 262 TRACE_EVENT_OBJECT_CREATED_WITH_ID(
262 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_); 263 TRACE_DISABLED_BY_DEFAULT("cc.debug"), "cc::LayerTreeHostImpl", id_);
263 264
264 top_controls_manager_ = 265 top_controls_manager_ =
265 TopControlsManager::Create(this, 266 TopControlsManager::Create(this,
266 settings.top_controls_show_threshold, 267 settings.top_controls_show_threshold,
267 settings.top_controls_hide_threshold); 268 settings.top_controls_hide_threshold);
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1202 NOTREACHED(); 1203 NOTREACHED();
1203 } 1204 }
1204 1205
1205 void LayerTreeHostImpl::ResetTreesForTesting() { 1206 void LayerTreeHostImpl::ResetTreesForTesting() {
1206 if (active_tree_) 1207 if (active_tree_)
1207 active_tree_->DetachLayerTree(); 1208 active_tree_->DetachLayerTree();
1208 active_tree_ = 1209 active_tree_ =
1209 LayerTreeImpl::create(this, active_tree()->page_scale_factor(), 1210 LayerTreeImpl::create(this, active_tree()->page_scale_factor(),
1210 active_tree()->top_controls_shown_ratio(), 1211 active_tree()->top_controls_shown_ratio(),
1211 active_tree()->elastic_overscroll()); 1212 active_tree()->elastic_overscroll());
1213 active_tree_->property_trees()->is_active = true;
1212 if (pending_tree_) 1214 if (pending_tree_)
1213 pending_tree_->DetachLayerTree(); 1215 pending_tree_->DetachLayerTree();
1214 pending_tree_ = nullptr; 1216 pending_tree_ = nullptr;
1215 if (recycle_tree_) 1217 if (recycle_tree_)
1216 recycle_tree_->DetachLayerTree(); 1218 recycle_tree_->DetachLayerTree();
1217 recycle_tree_ = nullptr; 1219 recycle_tree_ = nullptr;
1218 } 1220 }
1219 1221
1220 size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const { 1222 size_t LayerTreeHostImpl::SourceAnimationFrameNumberForTesting() const {
1221 return fps_counter_->current_frame_number(); 1223 return fps_counter_->current_frame_number();
(...skipping 2747 matching lines...) Expand 10 before | Expand all | Expand 10 after
3969 return task_runner_provider_->HasImplThread(); 3971 return task_runner_provider_->HasImplThread();
3970 } 3972 }
3971 3973
3972 bool LayerTreeHostImpl::CommitToActiveTree() const { 3974 bool LayerTreeHostImpl::CommitToActiveTree() const {
3973 // In single threaded mode we skip the pending tree and commit directly to the 3975 // In single threaded mode we skip the pending tree and commit directly to the
3974 // active tree. 3976 // active tree.
3975 return !task_runner_provider_->HasImplThread(); 3977 return !task_runner_provider_->HasImplThread();
3976 } 3978 }
3977 3979
3978 } // namespace cc 3980 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698