summaryrefslogtreecommitdiffstats
path: root/cc/trees/layer_tree_host_common.cc
diff options
context:
space:
mode:
authordtapuska <dtapuska@chromium.org>2016-01-29 07:14:48 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-29 15:15:37 +0000
commitee0b6981de62e9a234d031eab793da8d7752197b (patch)
treeef42a954bec374daaf7ca14a16a52e361c22ae56 /cc/trees/layer_tree_host_common.cc
parentc068fa909f540cc362576559c7eb9e205918f0a1 (diff)
downloadchromium_src-ee0b6981de62e9a234d031eab793da8d7752197b.zip
chromium_src-ee0b6981de62e9a234d031eab793da8d7752197b.tar.gz
chromium_src-ee0b6981de62e9a234d031eab793da8d7752197b.tar.bz2
Move have_wheel_event_handlers to WebLayerTreeView.
Since having wheel event handlers was based on the document in general there was no need for the hit testing code for determining the layer in cc. So it makes more sense to have these fields on the layer tree view. BUG=489802 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1639363002 Cr-Commit-Position: refs/heads/master@{#372346}
Diffstat (limited to 'cc/trees/layer_tree_host_common.cc')
-rw-r--r--cc/trees/layer_tree_host_common.cc26
1 files changed, 12 insertions, 14 deletions
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc
index 1414918..9dd0c22 100644
--- a/cc/trees/layer_tree_host_common.cc
+++ b/cc/trees/layer_tree_host_common.cc
@@ -644,9 +644,9 @@ static inline bool SubtreeShouldBeSkipped(LayerImpl* layer,
if (layer->num_copy_requests_in_target_subtree() > 0)
return false;
- // We cannot skip the the subtree if a descendant has a wheel or touch handler
+ // We cannot skip the the subtree if a descendant has a touch handler
// or the hit testing code will break (it requires fresh transforms, etc).
- if (layer->layer_or_descendant_has_input_handler())
+ if (layer->layer_or_descendant_has_touch_handler())
return false;
// If the layer is not drawn, then skip it and its subtree.
@@ -1058,20 +1058,20 @@ static inline void RemoveSurfaceForEarlyExit(
struct PreCalculateMetaInformationRecursiveData {
size_t num_unclipped_descendants;
int num_layer_or_descendants_with_copy_request;
- int num_layer_or_descendants_with_input_handler;
+ int num_layer_or_descendants_with_touch_handler;
int num_descendants_that_draw_content;
PreCalculateMetaInformationRecursiveData()
: num_unclipped_descendants(0),
num_layer_or_descendants_with_copy_request(0),
- num_layer_or_descendants_with_input_handler(0),
+ num_layer_or_descendants_with_touch_handler(0),
num_descendants_that_draw_content(0) {}
void Merge(const PreCalculateMetaInformationRecursiveData& data) {
num_layer_or_descendants_with_copy_request +=
data.num_layer_or_descendants_with_copy_request;
- num_layer_or_descendants_with_input_handler +=
- data.num_layer_or_descendants_with_input_handler;
+ num_layer_or_descendants_with_touch_handler +=
+ data.num_layer_or_descendants_with_touch_handler;
num_unclipped_descendants += data.num_unclipped_descendants;
num_descendants_that_draw_content += data.num_descendants_that_draw_content;
}
@@ -1128,9 +1128,8 @@ static void PreCalculateMetaInformationInternal(
if (layer->HasCopyRequest())
recursive_data->num_layer_or_descendants_with_copy_request++;
- if (!layer->touch_event_handler_region().IsEmpty() ||
- layer->have_wheel_event_handlers())
- recursive_data->num_layer_or_descendants_with_input_handler++;
+ if (!layer->touch_event_handler_region().IsEmpty())
+ recursive_data->num_layer_or_descendants_with_touch_handler++;
layer->set_num_unclipped_descendants(
recursive_data->num_unclipped_descendants);
@@ -1176,14 +1175,13 @@ static void PreCalculateMetaInformationInternal(
if (layer->HasCopyRequest())
recursive_data->num_layer_or_descendants_with_copy_request++;
- if (!layer->touch_event_handler_region().IsEmpty() ||
- layer->have_wheel_event_handlers())
- recursive_data->num_layer_or_descendants_with_input_handler++;
+ if (!layer->touch_event_handler_region().IsEmpty())
+ recursive_data->num_layer_or_descendants_with_touch_handler++;
layer->draw_properties().num_unclipped_descendants =
recursive_data->num_unclipped_descendants;
- layer->set_layer_or_descendant_has_input_handler(
- (recursive_data->num_layer_or_descendants_with_input_handler != 0));
+ layer->set_layer_or_descendant_has_touch_handler(
+ (recursive_data->num_layer_or_descendants_with_touch_handler != 0));
// TODO(enne): this should be synced from the main thread, so is only
// for tests constructing layers on the compositor thread.
layer->SetNumDescendantsThatDrawContent(