New issue
Advanced search Search tips

Issue 900438 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 5
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

overlay hints are being sent for the wrong resources

Project Member Reported by liber...@chromium.org, Oct 31

Issue description

overlay promotion hints on android are being sent for resources that don't have any quads in the render pass.  the result is that MCVD receives a "promote" and "won't promote" hint, and thus won't enter overlay mode.

previously, this was handled by checking for resources with delete pending, but that seems like it doesn't work anymore.

we probably need to go through the quad list completely in the strategy.

to avoid excess work, we can do this only when any resource (even if it has no quad) wants promotion hints.  so, we'll skip the work unless a video is actually being shown.
 
"is actually being shown" -- that's not quite right.  as long as some video frame has cc resources, which functionally means that it's had a quad somewhere for this frame or ~one frame ago.

note that we're already computing such a set in display_resource_updater.
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 1

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

commit 791f38e882a15bf2ab15884ab11430d3cff7b879
Author: liberato@chromium.org <liberato@chromium.org>
Date: Thu Nov 01 18:53:52 2018

Send overlay promotion hints only to displayed resources.

This change affects how overlays are chosen on Android.

Previously, DisplayResourceProvider would notify all resources that
requested a promotion hint, unless they were scheduled for deletion.
The intent was that only the resources that are used for the current
frame would receive hints.

However, that no longer works.  The DisplayResourceProvider was
sending hints to resources that weren't considered for overlay,
such as resources used by a previous CompositorFrame.  The result
was that the requestor would be told that the resource wasn't
promotable, and would try to switch away from SurfaceView.  In
reality, it just wasn't supposed to be on the screen.

Instead, we now explicitly construct a list of resource IDs that are
used by DrawQuads, and limit the hints to those.  We do this only
if any resource (displayed or not) is requesting promotion hints,
which should prevent the overlay processor from doing the extra
work except when the results actually will be used.

Bug:  900438 
Change-Id: Iba56e256b08233c9c05bd299d0ecd4a556807ccd
Reviewed-on: https://chromium-review.googlesource.com/c/1310498
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604655}
[modify] https://crrev.com/791f38e882a15bf2ab15884ab11430d3cff7b879/components/viz/service/display/display_resource_provider.cc
[modify] https://crrev.com/791f38e882a15bf2ab15884ab11430d3cff7b879/components/viz/service/display/display_resource_provider.h
[modify] https://crrev.com/791f38e882a15bf2ab15884ab11430d3cff7b879/components/viz/service/display/display_resource_provider_unittest.cc
[modify] https://crrev.com/791f38e882a15bf2ab15884ab11430d3cff7b879/components/viz/service/display/overlay_candidate.cc
[modify] https://crrev.com/791f38e882a15bf2ab15884ab11430d3cff7b879/components/viz/service/display/overlay_candidate.h
[modify] https://crrev.com/791f38e882a15bf2ab15884ab11430d3cff7b879/components/viz/service/display/overlay_processor.cc
[modify] https://crrev.com/791f38e882a15bf2ab15884ab11430d3cff7b879/components/viz/service/display/overlay_strategy_underlay.cc

Project Member

Comment 4 by sheriffbot@chromium.org, Nov 4

Labels: -Merge-Request-71 Hotlist-Merge-Review Merge-Review-71
This bug requires manual review: M71 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: benmason@(Android), kariahda@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Review -Merge-Review-71 Merge-Approved-71
Approved for merge to 71, branch 3578.
Project Member

Comment 6 by bugdroid1@chromium.org, Nov 5

Labels: -merge-approved-71 merge-merged-3578
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9c820622cfaf02366e6d5a07d6d41752803271fd

commit 9c820622cfaf02366e6d5a07d6d41752803271fd
Author: liberato@chromium.org <liberato@chromium.org>
Date: Mon Nov 05 20:24:37 2018

Send overlay promotion hints only to displayed resources.

This change affects how overlays are chosen on Android.

Previously, DisplayResourceProvider would notify all resources that
requested a promotion hint, unless they were scheduled for deletion.
The intent was that only the resources that are used for the current
frame would receive hints.

However, that no longer works.  The DisplayResourceProvider was
sending hints to resources that weren't considered for overlay,
such as resources used by a previous CompositorFrame.  The result
was that the requestor would be told that the resource wasn't
promotable, and would try to switch away from SurfaceView.  In
reality, it just wasn't supposed to be on the screen.

Instead, we now explicitly construct a list of resource IDs that are
used by DrawQuads, and limit the hints to those.  We do this only
if any resource (displayed or not) is requesting promotion hints,
which should prevent the overlay processor from doing the extra
work except when the results actually will be used.

Bug:  900438 
Change-Id: Iba56e256b08233c9c05bd299d0ecd4a556807ccd
Reviewed-on: https://chromium-review.googlesource.com/c/1310498
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#604655}(cherry picked from commit 791f38e882a15bf2ab15884ab11430d3cff7b879)
Reviewed-on: https://chromium-review.googlesource.com/c/1318417
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#520}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
[modify] https://crrev.com/9c820622cfaf02366e6d5a07d6d41752803271fd/components/viz/service/display/display_resource_provider.cc
[modify] https://crrev.com/9c820622cfaf02366e6d5a07d6d41752803271fd/components/viz/service/display/display_resource_provider.h
[modify] https://crrev.com/9c820622cfaf02366e6d5a07d6d41752803271fd/components/viz/service/display/display_resource_provider_unittest.cc
[modify] https://crrev.com/9c820622cfaf02366e6d5a07d6d41752803271fd/components/viz/service/display/overlay_candidate.cc
[modify] https://crrev.com/9c820622cfaf02366e6d5a07d6d41752803271fd/components/viz/service/display/overlay_candidate.h
[modify] https://crrev.com/9c820622cfaf02366e6d5a07d6d41752803271fd/components/viz/service/display/overlay_processor.cc
[modify] https://crrev.com/9c820622cfaf02366e6d5a07d6d41752803271fd/components/viz/service/display/overlay_strategy_underlay.cc

Labels: Merge-Merged-71-3578
The following revision refers to this bug: 
https://chromium.googlesource.com/chromium/src.git/+/9c820622cfaf02366e6d5a07d6d41752803271fd

Commit: 9c820622cfaf02366e6d5a07d6d41752803271fd
Author: liberato@chromium.org
Commiter: liberato@chromium.org
Date: 2018-11-05 20:24:37 +0000 UTC

Send overlay promotion hints only to displayed resources.

This change affects how overlays are chosen on Android.

Previously, DisplayResourceProvider would notify all resources that
requested a promotion hint, unless they were scheduled for deletion.
The intent was that only the resources that are used for the current
frame would receive hints.

However, that no longer works.  The DisplayResourceProvider was
sending hints to resources that weren't considered for overlay,
such as resources used by a previous CompositorFrame.  The result
was that the requestor would be told that the resource wasn't
promotable, and would try to switch away from SurfaceView.  In
reality, it just wasn't supposed to be on the screen.

Instead, we now explicitly construct a list of resource IDs that are
used by DrawQuads, and limit the hints to those.  We do this only
if any resource (displayed or not) is requesting promotion hints,
which should prevent the overlay processor from doing the extra
work except when the results actually will be used.

Bug:  900438 
Change-Id: Iba56e256b08233c9c05bd299d0ecd4a556807ccd
Reviewed-on: https://chromium-review.googlesource.com/c/1310498
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#604655}(cherry picked from commit 791f38e882a15bf2ab15884ab11430d3cff7b879)
Reviewed-on: https://chromium-review.googlesource.com/c/1318417
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/branch-heads/3578@{#520}
Cr-Branched-From: 4226ddf99103e493d7afb23a4c7902ee496108b6-refs/heads/master@{#599034}
Status: Fixed (was: Started)

Sign in to add a comment