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

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

Issue 2144303002: Made layout viewport scroll updates from compositor work like ordinary layers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rootScrollerOnCompositor
Patch Set: Initialize ScrollUpdateInfo's layer id in constructor 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.h ('k') | cc/trees/layer_tree_host_impl.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_common.h" 5 #include "cc/trees/layer_tree_host_common.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting:: 134 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting::
135 CalcDrawPropsImplInputsForTesting(LayerImpl* root_layer, 135 CalcDrawPropsImplInputsForTesting(LayerImpl* root_layer,
136 const gfx::Size& device_viewport_size, 136 const gfx::Size& device_viewport_size,
137 LayerImplList* render_surface_layer_list) 137 LayerImplList* render_surface_layer_list)
138 : CalcDrawPropsImplInputsForTesting(root_layer, 138 : CalcDrawPropsImplInputsForTesting(root_layer,
139 device_viewport_size, 139 device_viewport_size,
140 gfx::Transform(), 140 gfx::Transform(),
141 render_surface_layer_list) {} 141 render_surface_layer_list) {}
142 142
143 LayerTreeHostCommon::ScrollUpdateInfo::ScrollUpdateInfo()
144 : layer_id(Layer::INVALID_ID) {}
145
143 bool LayerTreeHostCommon::ScrollUpdateInfo::operator==( 146 bool LayerTreeHostCommon::ScrollUpdateInfo::operator==(
144 const LayerTreeHostCommon::ScrollUpdateInfo& other) const { 147 const LayerTreeHostCommon::ScrollUpdateInfo& other) const {
145 return layer_id == other.layer_id && scroll_delta == other.scroll_delta; 148 return layer_id == other.layer_id && scroll_delta == other.scroll_delta;
146 } 149 }
147 150
148 void LayerTreeHostCommon::ScrollUpdateInfo::ToProtobuf( 151 void LayerTreeHostCommon::ScrollUpdateInfo::ToProtobuf(
149 proto::ScrollUpdateInfo* proto) const { 152 proto::ScrollUpdateInfo* proto) const {
150 proto->set_layer_id(layer_id); 153 proto->set_layer_id(layer_id);
151 Vector2dToProto(scroll_delta, proto->mutable_scroll_delta()); 154 Vector2dToProto(scroll_delta, proto->mutable_scroll_delta());
152 } 155 }
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 692
690 PropertyTrees* GetPropertyTrees(Layer* layer) { 693 PropertyTrees* GetPropertyTrees(Layer* layer) {
691 return layer->layer_tree_host()->property_trees(); 694 return layer->layer_tree_host()->property_trees();
692 } 695 }
693 696
694 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 697 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
695 return layer->layer_tree_impl()->property_trees(); 698 return layer->layer_tree_impl()->property_trees();
696 } 699 }
697 700
698 } // namespace cc 701 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698