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

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

Issue 2080223010: cc: Clean up root_layer code in LTI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase++ Created 4 years, 5 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 3485 matching lines...) Expand 10 before | Expand all | Expand 10 after
3496 // screen_space_transform_is_animating. So when we see a new animation get 3496 // screen_space_transform_is_animating. So when we see a new animation get
3497 // activated, we need to update the draw properties on the active tree. 3497 // activated, we need to update the draw properties on the active tree.
3498 active_tree()->set_needs_update_draw_properties(); 3498 active_tree()->set_needs_update_draw_properties();
3499 // Request another frame to run the next tick of the animation. 3499 // Request another frame to run the next tick of the animation.
3500 SetNeedsOneBeginImplFrame(); 3500 SetNeedsOneBeginImplFrame();
3501 } 3501 }
3502 } 3502 }
3503 3503
3504 std::string LayerTreeHostImpl::LayerTreeAsJson() const { 3504 std::string LayerTreeHostImpl::LayerTreeAsJson() const {
3505 std::string str; 3505 std::string str;
3506 if (active_tree_->root_layer()) { 3506 if (active_tree_->root_layer_for_testing()) {
3507 std::unique_ptr<base::Value> json( 3507 std::unique_ptr<base::Value> json(
3508 active_tree_->root_layer()->LayerTreeAsJson()); 3508 active_tree_->root_layer_for_testing()->LayerTreeAsJson());
3509 base::JSONWriter::WriteWithOptions( 3509 base::JSONWriter::WriteWithOptions(
3510 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str); 3510 *json, base::JSONWriter::OPTIONS_PRETTY_PRINT, &str);
3511 } 3511 }
3512 return str; 3512 return str;
3513 } 3513 }
3514 3514
3515 void LayerTreeHostImpl::RegisterScrollbarAnimationController( 3515 void LayerTreeHostImpl::RegisterScrollbarAnimationController(
3516 int scroll_layer_id) { 3516 int scroll_layer_id) {
3517 if (settings().scrollbar_animator == LayerTreeSettings::NO_ANIMATOR) 3517 if (settings().scrollbar_animator == LayerTreeSettings::NO_ANIMATOR)
3518 return; 3518 return;
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
4010 return task_runner_provider_->HasImplThread(); 4010 return task_runner_provider_->HasImplThread();
4011 } 4011 }
4012 4012
4013 bool LayerTreeHostImpl::CommitToActiveTree() const { 4013 bool LayerTreeHostImpl::CommitToActiveTree() const {
4014 // In single threaded mode we skip the pending tree and commit directly to the 4014 // In single threaded mode we skip the pending tree and commit directly to the
4015 // active tree. 4015 // active tree.
4016 return !task_runner_provider_->HasImplThread(); 4016 return !task_runner_provider_->HasImplThread();
4017 } 4017 }
4018 4018
4019 } // namespace cc 4019 } // 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