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

Side by Side Diff: cc/trees/layer_tree_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: Rebase 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
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_impl.h" 5 #include "cc/trees/layer_tree_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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 viewport_size_invalid_(false), 74 viewport_size_invalid_(false),
75 needs_update_draw_properties_(true), 75 needs_update_draw_properties_(true),
76 needs_full_tree_sync_(true), 76 needs_full_tree_sync_(true),
77 next_activation_forces_redraw_(false), 77 next_activation_forces_redraw_(false),
78 has_ever_been_drawn_(false), 78 has_ever_been_drawn_(false),
79 render_surface_layer_list_id_(0), 79 render_surface_layer_list_id_(0),
80 have_scroll_event_handlers_(false), 80 have_scroll_event_handlers_(false),
81 event_listener_properties_(), 81 event_listener_properties_(),
82 top_controls_shrink_blink_size_(false), 82 top_controls_shrink_blink_size_(false),
83 top_controls_height_(0), 83 top_controls_height_(0),
84 top_controls_shown_ratio_(top_controls_shown_ratio) {} 84 top_controls_shown_ratio_(top_controls_shown_ratio) {
85 property_trees()->is_main_thread = false;
86 }
85 87
86 LayerTreeImpl::~LayerTreeImpl() { 88 LayerTreeImpl::~LayerTreeImpl() {
87 BreakSwapPromises(IsActiveTree() ? SwapPromise::SWAP_FAILS 89 BreakSwapPromises(IsActiveTree() ? SwapPromise::SWAP_FAILS
88 : SwapPromise::ACTIVATION_FAILS); 90 : SwapPromise::ACTIVATION_FAILS);
89 91
90 // Need to explicitly clear the tree prior to destroying this so that 92 // Need to explicitly clear the tree prior to destroying this so that
91 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor. 93 // the LayerTreeImpl pointer is still valid in the LayerImpl dtor.
92 DCHECK(!root_layer_); 94 DCHECK(!root_layer_);
93 DCHECK(layers_with_copy_output_request_.empty()); 95 DCHECK(layers_with_copy_output_request_.empty());
94 } 96 }
(...skipping 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after
2048 const gfx::BoxF& box, 2050 const gfx::BoxF& box,
2049 gfx::BoxF* bounds) const { 2051 gfx::BoxF* bounds) const {
2050 *bounds = gfx::BoxF(); 2052 *bounds = gfx::BoxF();
2051 return layer_tree_host_impl_->animation_host() 2053 return layer_tree_host_impl_->animation_host()
2052 ? layer_tree_host_impl_->animation_host() 2054 ? layer_tree_host_impl_->animation_host()
2053 ->TransformAnimationBoundsForBox(layer->id(), box, bounds) 2055 ->TransformAnimationBoundsForBox(layer->id(), box, bounds)
2054 : true; 2056 : true;
2055 } 2057 }
2056 2058
2057 } // namespace cc 2059 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698