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

Issue 2846653002: cc : Stop pushing layers from hidden subtrees at commit

Created:
3 years, 8 months ago by jaydasika
Modified:
3 years, 6 months ago
CC:
ajuma, cc-bugs_chromium.org, chromium-reviews, pdr., wkorman
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

cc : Stop pushing layers from hidden subtrees at commit A cc::Layer is hidden if it has an ancestor with Layer::hide_layer_and_subtree = true and has no descendant with copy request. With this CL, we also stop creating property tree nodes for these layers and stop sending them at commit to the compositor thread. BUG=595843 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : . #

Patch Set 4 : . #

Total comments: 1

Patch Set 5 : rebase #

Patch Set 6 : don't add hidden layers to push propreties list #

Total comments: 4

Patch Set 7 : rebase #

Patch Set 8 : fix ash_unittests #

Patch Set 9 : rebase #

Patch Set 10 : rebase #

Patch Set 11 : rebase #

Patch Set 12 : rebase #

Patch Set 13 : send hidden surface ids also #

Patch Set 14 : fix cc_unittests after rebase #

Total comments: 8

Patch Set 15 : hide mask layer also #

Total comments: 8

Patch Set 16 : rebase #

Patch Set 17 : comments #

Patch Set 18 : . #

Total comments: 2

Patch Set 19 : only add valid surface ids #

Patch Set 20 : rebase #

Patch Set 21 : add TODO #

Total comments: 2

Patch Set 22 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -309 lines) Patch
M cc/layers/layer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +5 lines, -0 lines 0 comments Download
M cc/layers/layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +11 lines, -0 lines 0 comments Download
M cc/layers/layer_impl_test_properties.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -2 lines 0 comments Download
M cc/layers/layer_impl_test_properties.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +0 lines, -2 lines 0 comments Download
M cc/layers/layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -0 lines 0 comments Download
M cc/layers/picture_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/draw_property_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +10 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_common_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +107 lines, -270 lines 0 comments Download
M cc/trees/occlusion_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M cc/trees/property_tree_builder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +49 lines, -19 lines 0 comments Download
M cc/trees/tree_synchronizer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +27 lines, -14 lines 0 comments Download

Messages

Total messages: 79 (51 generated)
jaydasika
PTAL
3 years, 7 months ago (2017-04-27 21:35:08 UTC) #4
jaydasika
https://codereview.chromium.org/2846653002/diff/60001/cc/trees/layer_tree_host_common_unittest.cc File cc/trees/layer_tree_host_common_unittest.cc (left): https://codereview.chromium.org/2846653002/diff/60001/cc/trees/layer_tree_host_common_unittest.cc#oldcode5371 cc/trees/layer_tree_host_common_unittest.cc:5371: TEST_F(LayerTreeHostCommonTest, SubtreeHidden_SingleLayerImpl) { Deleted these tests as hidden subtrees ...
3 years, 7 months ago (2017-04-27 21:36:58 UTC) #7
enne (OOO)
I don't remember what the goal of this feature was when added. Is it something ...
3 years, 7 months ago (2017-04-27 21:46:10 UTC) #10
jaydasika
On 2017/04/27 21:46:10, enne wrote: > I don't remember what the goal of this feature ...
3 years, 7 months ago (2017-04-27 21:53:51 UTC) #11
weiliangc
On 2017/04/27 21:53:51, jaydasika wrote: > On 2017/04/27 21:46:10, enne wrote: > > I don't ...
3 years, 7 months ago (2017-05-01 20:03:26 UTC) #24
enne (OOO)
https://codereview.chromium.org/2846653002/diff/100001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/2846653002/diff/100001/cc/trees/layer_tree_host.cc#newcode1073 cc/trees/layer_tree_host.cc:1073: if (layer->is_hidden()) This is a little awkward, here. I ...
3 years, 7 months ago (2017-05-01 20:15:09 UTC) #25
jaydasika
https://codereview.chromium.org/2846653002/diff/100001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/2846653002/diff/100001/cc/trees/layer_tree_host.cc#newcode1073 cc/trees/layer_tree_host.cc:1073: if (layer->is_hidden()) On 2017/05/01 20:15:09, enne wrote: > This ...
3 years, 7 months ago (2017-05-01 23:41:39 UTC) #32
enne (OOO)
https://codereview.chromium.org/2846653002/diff/100001/cc/trees/layer_tree_host.cc File cc/trees/layer_tree_host.cc (right): https://codereview.chromium.org/2846653002/diff/100001/cc/trees/layer_tree_host.cc#newcode1073 cc/trees/layer_tree_host.cc:1073: if (layer->is_hidden()) On 2017/05/01 at 23:41:39, jaydasika wrote: > ...
3 years, 7 months ago (2017-05-02 01:46:02 UTC) #35
jaydasika
Tab capture browser tests are failing with this patch. It happens because they expect hidden ...
3 years, 7 months ago (2017-05-11 18:05:19 UTC) #40
danakj
On Thu, May 11, 2017 at 2:05 PM, <jaydasika@chromium.org> wrote: > Tab capture browser tests ...
3 years, 7 months ago (2017-05-11 20:15:40 UTC) #41
jaydasika
On 2017/05/11 20:15:40, danakj wrote: > On Thu, May 11, 2017 at 2:05 PM, <mailto:jaydasika@chromium.org> ...
3 years, 7 months ago (2017-05-11 20:50:57 UTC) #42
miu
On 2017/05/11 20:50:57, jaydasika wrote: > On 2017/05/11 20:15:40, danakj wrote: > > On Thu, ...
3 years, 7 months ago (2017-05-11 22:25:20 UTC) #43
jbauman
On 2017/05/11 22:25:20, miu wrote: > On 2017/05/11 20:50:57, jaydasika wrote: > > On 2017/05/11 ...
3 years, 7 months ago (2017-05-11 22:40:23 UTC) #44
danakj
On Thu, May 11, 2017 at 6:25 PM, <miu@chromium.org> wrote: > On 2017/05/11 20:50:57, jaydasika ...
3 years, 7 months ago (2017-05-12 14:52:19 UTC) #45
miu
So, jaydasika, I'm not sure if our discussion helped you figure out what's causing the ...
3 years, 7 months ago (2017-05-12 23:10:37 UTC) #46
jaydasika
On 2017/05/12 23:10:37, miu wrote: > So, jaydasika, I'm not sure if our discussion helped ...
3 years, 7 months ago (2017-05-13 00:56:51 UTC) #47
enne (OOO)
On 2017/05/13 at 00:56:51, jaydasika wrote: > On 2017/05/12 23:10:37, miu wrote: > > So, ...
3 years, 7 months ago (2017-05-15 17:24:04 UTC) #48
chrishtr
On 2017/05/15 at 17:24:04, enne wrote: > On 2017/05/13 at 00:56:51, jaydasika wrote: > > ...
3 years, 7 months ago (2017-05-16 20:25:43 UTC) #49
jaydasika
On 2017/05/16 20:25:43, chrishtr wrote: > On 2017/05/15 at 17:24:04, enne wrote: > > On ...
3 years, 7 months ago (2017-05-17 00:57:30 UTC) #50
enne (OOO)
On 2017/05/17 at 00:57:30, jaydasika wrote: > On 2017/05/16 20:25:43, chrishtr wrote: > > Jayadev, ...
3 years, 7 months ago (2017-05-17 01:26:49 UTC) #51
jaydasika
Sending hidden surface layer ids also at commit/activation. Verified locally that the offscreen tab capture ...
3 years, 7 months ago (2017-05-19 19:09:00 UTC) #54
Fady Samuel
On 2017/05/17 01:26:49, enne wrote: > On 2017/05/17 at 00:57:30, jaydasika wrote: > > On ...
3 years, 7 months ago (2017-05-19 19:35:33 UTC) #55
enne (OOO)
Agreed in general that referenced_surfaces should probably go away. It just seemed like something that ...
3 years, 7 months ago (2017-05-19 19:50:42 UTC) #56
enne (OOO)
https://codereview.chromium.org/2846653002/diff/260001/cc/trees/property_tree_builder.cc File cc/trees/property_tree_builder.cc (right): https://codereview.chromium.org/2846653002/diff/260001/cc/trees/property_tree_builder.cc#newcode1229 cc/trees/property_tree_builder.cc:1229: if (!data_for_children.is_hidden && MaskLayer(layer)) { Maybe this should early ...
3 years, 7 months ago (2017-05-19 22:27:05 UTC) #63
jaydasika
https://codereview.chromium.org/2846653002/diff/260001/cc/trees/property_tree_builder.cc File cc/trees/property_tree_builder.cc (right): https://codereview.chromium.org/2846653002/diff/260001/cc/trees/property_tree_builder.cc#newcode1229 cc/trees/property_tree_builder.cc:1229: if (!data_for_children.is_hidden && MaskLayer(layer)) { On 2017/05/19 22:27:05, enne ...
3 years, 7 months ago (2017-05-23 00:25:14 UTC) #66
jaydasika
There are too many changes here, splitting this CL, will first try to land https://codereview.chromium.org/2905533002/
3 years, 7 months ago (2017-05-24 00:43:52 UTC) #73
jaydasika
Addressed all the comments. With https://codereview.chromium.org/2905533002/ landed, this now passes all the tests.
3 years, 7 months ago (2017-05-26 21:18:42 UTC) #78
enne (OOO)
3 years, 6 months ago (2017-05-29 23:14:11 UTC) #79
https://codereview.chromium.org/2846653002/diff/400001/cc/trees/property_tree...
File cc/trees/property_tree_builder.cc (right):

https://codereview.chromium.org/2846653002/diff/400001/cc/trees/property_tree...
cc/trees/property_tree_builder.cc:1148: if (MaskLayer(layer))
Is this required? I worry that this is one more avenue for inconstency (like
bounds), and would rather just have mask layers never have their hidden state
queried or set anywhere.

https://codereview.chromium.org/2846653002/diff/400001/cc/trees/property_tree...
cc/trees/property_tree_builder.cc:1185: SetIsHidden(layer,
data_for_children.is_hidden);
I am not that keen on setting (more) data on layers during property tree
building.  I think I can understand building property trees setting property
tree indexes, but this is like extra calculated data that gets set.  It just
makes the data flow (and understanding which data is read and which is write on
layers) harder to understand.

For instance, with this patch, somebody could call Layer::SetIsHidden(true) and
then this function could come through and clobber it to be SetIsHidden(false),
which would be quite confusing.

I think maybe having an internal SetIsInHiddenSubtree function (named
differently than IsHidden) that was protected/friended could help this. 
Alternatively, maybe the callers in ui could recursively call SetIsHidden and we
could drop the SubtreeIsHidden API, although that's a larger change.

Powered by Google App Engine
This is Rietveld 408576698