summaryrefslogtreecommitdiffstats
path: root/cc/layers/draw_properties.h
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-05 02:07:46 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-05 02:07:46 +0000
commitbcfef7a01ded80ae37e697c12e5e35f3d337ec0c (patch)
tree9b1082251d5d108b3023b5d06baaf5f0bfac3ceb /cc/layers/draw_properties.h
parentf9df530b76176476ba0d6f67e1b8b2cb17bc34bb (diff)
downloadchromium_src-bcfef7a01ded80ae37e697c12e5e35f3d337ec0c.zip
chromium_src-bcfef7a01ded80ae37e697c12e5e35f3d337ec0c.tar.gz
chromium_src-bcfef7a01ded80ae37e697c12e5e35f3d337ec0c.tar.bz2
cc: Fix hit-testing in zero-opacity layers.
If a layer that accepts touch or wheel events, but the layer (or one of its ancestor layers) has zero opacity, then make sure the layer hit-tests correctly. BUG=295295 R=enne@chromium.org, rbyers@google.com Review URL: https://codereview.chromium.org/26112002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/draw_properties.h')
-rw-r--r--cc/layers/draw_properties.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/cc/layers/draw_properties.h b/cc/layers/draw_properties.h
index 990b4c97..fffb5a9 100644
--- a/cc/layers/draw_properties.h
+++ b/cc/layers/draw_properties.h
@@ -35,7 +35,8 @@ struct CC_EXPORT DrawProperties {
index_of_first_descendants_addition(0),
num_descendants_added(0),
index_of_first_render_surface_layer_list_addition(0),
- num_render_surfaces_added(0) {}
+ num_render_surfaces_added(0),
+ skip_drawing(false) {}
// Transforms objects from content space to target surface space, where
// this layer would be drawn.
@@ -121,6 +122,12 @@ struct CC_EXPORT DrawProperties {
size_t num_descendants_added;
size_t index_of_first_render_surface_layer_list_addition;
size_t num_render_surfaces_added;
+
+ // If the layer is part of a [sub]tree that has a touch/wheel event handler,
+ // then the layer is not skipped during CalculateDrawPropertiesInternal, even
+ // if it does not actually have anything to draw (e.g. zero opacity, or empty
+ // content). This flag is used to keep track of such layers.
+ bool skip_drawing;
};
} // namespace cc