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

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

Issue 2080703005: cc: Remove LayerTreeImpl::root_layer usage outside tests (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 | « cc/trees/occlusion_tracker.cc ('k') | cc/trees/tree_synchronizer.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include <set> 7 #include <set>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 changed |= synced_scroll_offset(key)->PushPendingToActive(); 2010 changed |= synced_scroll_offset(key)->PushPendingToActive();
2011 if (changed) { 2011 if (changed) {
2012 layer_tree_impl->DidUpdateScrollOffset(key, -1); 2012 layer_tree_impl->DidUpdateScrollOffset(key, -1);
2013 } 2013 }
2014 } 2014 }
2015 } 2015 }
2016 2016
2017 void ScrollTree::UpdateScrollOffsetMap( 2017 void ScrollTree::UpdateScrollOffsetMap(
2018 ScrollTree::ScrollOffsetMap* new_scroll_offset_map, 2018 ScrollTree::ScrollOffsetMap* new_scroll_offset_map,
2019 LayerTreeImpl* layer_tree_impl) { 2019 LayerTreeImpl* layer_tree_impl) {
2020 if (layer_tree_impl && layer_tree_impl->root_layer()) { 2020 if (layer_tree_impl && !layer_tree_impl->LayerListIsEmpty()) {
2021 DCHECK(!property_trees()->is_main_thread); 2021 DCHECK(!property_trees()->is_main_thread);
2022 for (auto map_entry = layer_id_to_scroll_offset_map_.begin(); 2022 for (auto map_entry = layer_id_to_scroll_offset_map_.begin();
2023 map_entry != layer_id_to_scroll_offset_map_.end();) { 2023 map_entry != layer_id_to_scroll_offset_map_.end();) {
2024 int key = map_entry->first; 2024 int key = map_entry->first;
2025 if (new_scroll_offset_map->find(key) != new_scroll_offset_map->end()) { 2025 if (new_scroll_offset_map->find(key) != new_scroll_offset_map->end()) {
2026 UpdateScrollOffsetMapEntry(key, new_scroll_offset_map, layer_tree_impl); 2026 UpdateScrollOffsetMapEntry(key, new_scroll_offset_map, layer_tree_impl);
2027 ++map_entry; 2027 ++map_entry;
2028 } else { 2028 } else {
2029 map_entry = layer_id_to_scroll_offset_map_.erase(map_entry); 2029 map_entry = layer_id_to_scroll_offset_map_.erase(map_entry);
2030 } 2030 }
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 value->EndDictionary(); 2391 value->EndDictionary();
2392 2392
2393 value->BeginDictionary("scroll_tree"); 2393 value->BeginDictionary("scroll_tree");
2394 scroll_tree.AsValueInto(value.get()); 2394 scroll_tree.AsValueInto(value.get());
2395 value->EndDictionary(); 2395 value->EndDictionary();
2396 2396
2397 return value; 2397 return value;
2398 } 2398 }
2399 2399
2400 } // namespace cc 2400 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/occlusion_tracker.cc ('k') | cc/trees/tree_synchronizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698