New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 592440 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 557194



Sign in to add a comment

Find an analog to subtree-should-be-skipped for layer lists

Project Member Reported by vollick@chromium.org, Mar 7 2016

Issue description

As an optimization, we skip subtrees of the layer tree. If we want to continue to skip swaths of layers, we will need to leverage information in the layer list and property trees instead (and we'll need to find a way to do this efficiently to avoid doing a bunch of work per layer to figure out which work to skip).

There is a different set of criteria for skipping on the main and compositor thread. I'll list them here for the impl thread to give a sense of the issue.

 * has singular transform (easily computed from the effect tree).
 * num copy requests in subtree (this will presumably be stored on the effect tree, but isn't yet).
 * layer or descendant has a touch handler
    * I don't think we've figured out hit testing yet, but there are at least two ways we could proceed
      1. Since the point of this optimization is to ensure we have accurate hit test information, we could simply not skip subtrees of the transform tree (save under singular transforms).
      2. If we do want to skip portions of the transform tree more aggressively, we will know which transform tree nodes are associated with hit test regions and we can ensure that they at least get updated.
 * layer is drawn (info is already on effect tree).
 * backface invisible (info should already be on prop trees).
 * is a pending layer with, potentially, an opacity animation (requires sorting out animations).
 * has background filters, or zero effective opacity.

 
Cc: enne@chromium.org
 Issue 539561  has been merged into this issue.
layer or descendant has a touch handler : Hit testing uses screen space transform of layers and content rect of render surfaces. 
1) Screen Space transform : I think we should be fine here even if the subtree gets skipped (We calculate screen space transform from transform tree directly for this case).
2) Content rect : We already walk the clip tree during hit testing and ideally this should be enough. The only reason we also use content rect is because the content rect can be clipped by the max texture size and this information is not present in clip tree.

So, if the max texture size case is handled somehow, we can remove this condition from subtree-should-be-skipped.   

Comment 3 by sunxd@chromium.org, Mar 16 2016

Owner: sunxd@chromium.org
I think num_copy_requests_in_subtree is moved to effect tree. I'll take this issue.
Project Member

Comment 4 by bugdroid1@chromium.org, Apr 1 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6

commit 71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6
Author: sunxd <sunxd@chromium.org>
Date: Fri Apr 01 23:48:05 2016

SubtreeShouldBeSkipped uses information from property trees, and is
renamed to LayerShouldBeSkippedWithMaskAndReplica, as it is now skipping
individual layers instead of subtrees.

The LayerImpl version FindLayersThatNeedUpdates uses LayerList
iterator and the new version of LayerShouldBeSkippedWithMaskAndReplica.

Fix the unit tests.

BUG= 592440 
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel

Review URL: https://codereview.chromium.org/1811423002

Cr-Commit-Position: refs/heads/master@{#384720}

[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/proto/property_tree.proto
[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/test/layer_test_common.cc
[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/test/layer_test_common.h
[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/trees/draw_property_utils.cc
[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/trees/layer_tree_host_common.cc
[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/trees/layer_tree_host_common_unittest.cc
[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/trees/property_tree.cc
[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/trees/property_tree.h
[modify] https://crrev.com/71aea3ee6feb1ca9ca8b4b500a1d95f29d7ebbc6/cc/trees/property_tree_builder.cc

Comment 5 by sunxd@chromium.org, Apr 4 2016

Status: Fixed (was: Available)

Sign in to add a comment