diff options
author | vollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-17 20:52:59 +0000 |
---|---|---|
committer | vollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-17 20:52:59 +0000 |
commit | 995708c520450838c36a48e50b69a63e46dd07f8 (patch) | |
tree | 7ee021437a351d40fdb934c70a5394c615cc9990 /cc/layers/draw_properties.h | |
parent | 6d9e0233cf95ab7f893bd6cc26318db9dbdc8fed (diff) | |
download | chromium_src-995708c520450838c36a48e50b69a63e46dd07f8.zip chromium_src-995708c520450838c36a48e50b69a63e46dd07f8.tar.gz chromium_src-995708c520450838c36a48e50b69a63e46dd07f8.tar.bz2 |
Revert "Revert "Allow clipping by scroll parents." and "Improve perf of CalculateDrawPropertiesInternal when there are no scroll parents.""
This reverts commit 97ada322de9f492e3f0d1741ac117fc42599451b.
This was a speculative perf revert; seems not to be the issue. Relanding.
Local tests with and without this patch on a Nexus 4 with and without my patch didn't show a perf regression (in fact, perf seemed to mysteriously improve -- I assume this is noise).
TBR=danakj@chromium.org
BUG=306926
Review URL: https://codereview.chromium.org/26135005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/draw_properties.h')
-rw-r--r-- | cc/layers/draw_properties.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/cc/layers/draw_properties.h b/cc/layers/draw_properties.h index 06c8834..b81bec7 100644 --- a/cc/layers/draw_properties.h +++ b/cc/layers/draw_properties.h @@ -29,7 +29,13 @@ struct CC_EXPORT DrawProperties { num_descendants_that_draw_content(0), num_unclipped_descendants(0), can_draw_directly_to_backbuffer(false), - layer_or_descendant_has_copy_request(false) {} + layer_or_descendant_has_copy_request(false), + has_child_with_a_scroll_parent(false), + sorted_for_recursion(false), + index_of_first_descendants_addition(0), + num_descendants_added(0), + index_of_first_render_surface_layer_list_addition(0), + num_render_surfaces_added(0) {} // Transforms objects from content space to target surface space, where // this layer would be drawn. @@ -97,6 +103,24 @@ struct CC_EXPORT DrawProperties { // If true, the layer or some layer in its sub-tree has a CopyOutputRequest // present on it. bool layer_or_descendant_has_copy_request; + + // This is true if the layer has any direct child that has a scroll parent. + // This layer will not be the scroll parent in this case. This information + // lets us avoid work in CalculateDrawPropertiesInternal -- if none of our + // children have scroll parents, we will not need to recur out of order. + bool has_child_with_a_scroll_parent; + + // This is true if the order (wrt to its siblings in the tree) in which the + // layer will be visited while computing draw properties has been determined. + bool sorted_for_recursion; + + // If this layer is visited out of order, its contribution to the descendant + // and render surface layer lists will be put aside in a temporary list. + // These values will allow for an efficient reordering of these additions. + size_t index_of_first_descendants_addition; + size_t num_descendants_added; + size_t index_of_first_render_surface_layer_list_addition; + size_t num_render_surfaces_added; }; } // namespace cc |