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

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

Issue 2087963003: cc: Stop creating unused 0 property tree nodes other than transform 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
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 2545 matching lines...) Expand 10 before | Expand all | Expand 10 after
2556 DCHECK(scroll_on_main_thread); 2556 DCHECK(scroll_on_main_thread);
2557 DCHECK(main_thread_scrolling_reasons); 2557 DCHECK(main_thread_scrolling_reasons);
2558 *main_thread_scrolling_reasons = 2558 *main_thread_scrolling_reasons =
2559 MainThreadScrollingReason::kNotScrollingOnMain; 2559 MainThreadScrollingReason::kNotScrollingOnMain;
2560 2560
2561 // Walk up the hierarchy and look for a scrollable layer. 2561 // Walk up the hierarchy and look for a scrollable layer.
2562 LayerImpl* potentially_scrolling_layer_impl = NULL; 2562 LayerImpl* potentially_scrolling_layer_impl = NULL;
2563 if (layer_impl) { 2563 if (layer_impl) {
2564 ScrollTree& scroll_tree = active_tree_->property_trees()->scroll_tree; 2564 ScrollTree& scroll_tree = active_tree_->property_trees()->scroll_tree;
2565 ScrollNode* scroll_node = scroll_tree.Node(layer_impl->scroll_tree_index()); 2565 ScrollNode* scroll_node = scroll_tree.Node(layer_impl->scroll_tree_index());
2566 for (; scroll_tree.parent(scroll_node); 2566 for (; scroll_node; scroll_node = scroll_tree.parent(scroll_node)) {
2567 scroll_node = scroll_tree.parent(scroll_node)) {
2568 // The content layer can also block attempts to scroll outside the main 2567 // The content layer can also block attempts to scroll outside the main
2569 // thread. 2568 // thread.
2570 ScrollStatus status = 2569 ScrollStatus status =
2571 TryScroll(device_viewport_point, type, scroll_tree, scroll_node); 2570 TryScroll(device_viewport_point, type, scroll_tree, scroll_node);
2572 if (status.thread == SCROLL_ON_MAIN_THREAD) { 2571 if (status.thread == SCROLL_ON_MAIN_THREAD) {
2573 if (!!scroll_node->data.main_thread_scrolling_reasons) { 2572 if (!!scroll_node->data.main_thread_scrolling_reasons) {
2574 DCHECK(MainThreadScrollingReason::MainThreadCanSetScrollReasons( 2573 DCHECK(MainThreadScrollingReason::MainThreadCanSetScrollReasons(
2575 status.main_thread_scrolling_reasons)); 2574 status.main_thread_scrolling_reasons));
2576 } else { 2575 } else {
2577 DCHECK(MainThreadScrollingReason::CompositorCanSetScrollReasons( 2576 DCHECK(MainThreadScrollingReason::CompositorCanSetScrollReasons(
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
4029 const { 4028 const {
4030 return fixed_raster_scale_attempted_scale_change_history_.count() >= 4029 return fixed_raster_scale_attempted_scale_change_history_.count() >=
4031 kFixedRasterScaleAttemptedScaleChangeThreshold; 4030 kFixedRasterScaleAttemptedScaleChangeThreshold;
4032 } 4031 }
4033 4032
4034 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() { 4033 void LayerTreeHostImpl::SetFixedRasterScaleAttemptedToChangeScale() {
4035 fixed_raster_scale_attempted_scale_change_history_.set(0); 4034 fixed_raster_scale_attempted_scale_change_history_.set(0);
4036 } 4035 }
4037 4036
4038 } // namespace cc 4037 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698