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

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

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Rebase Created 4 years, 10 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_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 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 if (layer->clip_children()) { 1122 if (layer->clip_children()) {
1123 size_t num_clip_children = layer->clip_children()->size(); 1123 size_t num_clip_children = layer->clip_children()->size();
1124 DCHECK_GE(recursive_data->num_unclipped_descendants, num_clip_children); 1124 DCHECK_GE(recursive_data->num_unclipped_descendants, num_clip_children);
1125 recursive_data->num_unclipped_descendants -= num_clip_children; 1125 recursive_data->num_unclipped_descendants -= num_clip_children;
1126 } 1126 }
1127 1127
1128 if (layer->HasCopyRequest()) 1128 if (layer->HasCopyRequest())
1129 recursive_data->num_layer_or_descendants_with_copy_request++; 1129 recursive_data->num_layer_or_descendants_with_copy_request++;
1130 1130
1131 if (!layer->touch_event_handler_region().IsEmpty() || 1131 if (!layer->touch_event_handler_region().IsEmpty() ||
1132 layer->have_wheel_event_handlers()) 1132 layer->wheel_event_properties() != EventListenerProperties::kNone)
1133 recursive_data->num_layer_or_descendants_with_input_handler++; 1133 recursive_data->num_layer_or_descendants_with_input_handler++;
1134 1134
1135 layer->set_num_unclipped_descendants( 1135 layer->set_num_unclipped_descendants(
1136 recursive_data->num_unclipped_descendants); 1136 recursive_data->num_unclipped_descendants);
1137 1137
1138 if (IsRootLayer(layer)) 1138 if (IsRootLayer(layer))
1139 layer->layer_tree_host()->SetNeedsMetaInfoRecomputation(false); 1139 layer->layer_tree_host()->SetNeedsMetaInfoRecomputation(false);
1140 } 1140 }
1141 1141
1142 static void PreCalculateMetaInformationInternal( 1142 static void PreCalculateMetaInformationInternal(
(...skipping 27 matching lines...) Expand all
1170 if (layer->clip_children()) { 1170 if (layer->clip_children()) {
1171 size_t num_clip_children = layer->clip_children()->size(); 1171 size_t num_clip_children = layer->clip_children()->size();
1172 DCHECK_GE(recursive_data->num_unclipped_descendants, num_clip_children); 1172 DCHECK_GE(recursive_data->num_unclipped_descendants, num_clip_children);
1173 recursive_data->num_unclipped_descendants -= num_clip_children; 1173 recursive_data->num_unclipped_descendants -= num_clip_children;
1174 } 1174 }
1175 1175
1176 if (layer->HasCopyRequest()) 1176 if (layer->HasCopyRequest())
1177 recursive_data->num_layer_or_descendants_with_copy_request++; 1177 recursive_data->num_layer_or_descendants_with_copy_request++;
1178 1178
1179 if (!layer->touch_event_handler_region().IsEmpty() || 1179 if (!layer->touch_event_handler_region().IsEmpty() ||
1180 layer->have_wheel_event_handlers()) 1180 layer->wheel_event_properties() != EventListenerProperties::kNone)
1181 recursive_data->num_layer_or_descendants_with_input_handler++; 1181 recursive_data->num_layer_or_descendants_with_input_handler++;
1182 1182
1183 layer->draw_properties().num_unclipped_descendants = 1183 layer->draw_properties().num_unclipped_descendants =
1184 recursive_data->num_unclipped_descendants; 1184 recursive_data->num_unclipped_descendants;
1185 layer->set_layer_or_descendant_has_input_handler( 1185 layer->set_layer_or_descendant_has_input_handler(
1186 (recursive_data->num_layer_or_descendants_with_input_handler != 0)); 1186 (recursive_data->num_layer_or_descendants_with_input_handler != 0));
1187 // TODO(enne): this should be synced from the main thread, so is only 1187 // TODO(enne): this should be synced from the main thread, so is only
1188 // for tests constructing layers on the compositor thread. 1188 // for tests constructing layers on the compositor thread.
1189 layer->SetNumDescendantsThatDrawContent( 1189 layer->SetNumDescendantsThatDrawContent(
1190 recursive_data->num_descendants_that_draw_content); 1190 recursive_data->num_descendants_that_draw_content);
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
2833 2833
2834 PropertyTrees* GetPropertyTrees(Layer* layer) { 2834 PropertyTrees* GetPropertyTrees(Layer* layer) {
2835 return layer->layer_tree_host()->property_trees(); 2835 return layer->layer_tree_host()->property_trees();
2836 } 2836 }
2837 2837
2838 PropertyTrees* GetPropertyTrees(LayerImpl* layer) { 2838 PropertyTrees* GetPropertyTrees(LayerImpl* layer) {
2839 return layer->layer_tree_impl()->property_trees(); 2839 return layer->layer_tree_impl()->property_trees();
2840 } 2840 }
2841 2841
2842 } // namespace cc 2842 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698