New issue
Advanced search Search tips

Issue 671365 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug

Blocking:
issue 662995



Sign in to add a comment

Request overlay promotion hint in AVDA

Project Member Reported by liber...@chromium.org, Dec 5 2016

Issue description

Mark outgoing pictures as "allow_overlay" all the time, but also mark them as backed by surface texture if needed.  this will prevent overlay, but allow us to receive a hint.

also, request the hint by marking them as "wants_promotion_hint".

pretty much, do this:

diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
index 1fe3474..e34b7d2 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -741,12 +741,15 @@ void AndroidVideoDecodeAccelerator::SendDecodedFrameToClient(
   if (size_changed)
     picture_buffer.set_size(size_);
 
-  const bool allow_overlay = picture_buffer_manager_.ArePicturesOverlayable();
-  UMA_HISTOGRAM_BOOLEAN("Media.AVDA.FrameSentAsOverlay", allow_overlay);
+  const bool surface_view = picture_buffer_manager_.ArePicturesOverlayable();
+  UMA_HISTOGRAM_BOOLEAN("Media.AVDA.FrameSentAsOverlay", surface_view);
   // TODO(hubbe): Insert the correct color space.  http://crbug.com/647725 
   Picture picture(picture_buffer_id, bitstream_id, gfx::Rect(size_),
-                  gfx::ColorSpace(), allow_overlay);
+                  gfx::ColorSpace(), true /* allow_overlay */);
   picture.set_size_changed(size_changed);
+  picture.set_surface_texture(!surface_view);
+  picture.set_wants_promotion_hint(true);
 
   // Notify picture ready before calling UseCodecBufferForPictureBuffer() since
   // that process may be slow and shouldn't delay delivery of the frame to the

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 28 2017

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

commit 68ec57f3e3114a39ea147c7fe956fa3b9d3a601d
Author: liberato@chromium.org <liberato@chromium.org>
Date: Wed Jun 28 00:43:05 2017

Added PromotionHintAggregator for AVDA.

PromotionHintAggregator takes compositor feedback and aggregates
it into a single "promote / don't promote" signal.  This signal is
sent from AVDACodecImage to the surface chooser, which uses it to
switch back to SurfaceTexture if needed.

This CL also requests feedback from the compositor about whether a
video quad would be promoted.

Bug:  662995 ,  671365 
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Iaef3e5bb21e018033c9dd4e024c7e65daf0c5c35
Reviewed-on: https://chromium-review.googlesource.com/545195
Commit-Queue: Frank Liberato <liberato@chromium.org>
Reviewed-by: Thomas Guilbert <tguilbert@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482823}
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/blink/webmediaplayer_impl.cc
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/BUILD.gn
[add] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android/promotion_hint_aggregator.h
[add] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android/promotion_hint_aggregator_impl.cc
[add] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android/promotion_hint_aggregator_impl.h
[add] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android/promotion_hint_aggregator_impl_unittest.cc
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android_video_decode_accelerator.cc
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android_video_decode_accelerator.h
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android_video_surface_chooser.h
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android_video_surface_chooser_impl.cc
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/android_video_surface_chooser_impl_unittest.cc
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/avda_codec_image.cc
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/avda_codec_image.h
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/avda_picture_buffer_manager.cc
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/avda_shared_state.cc
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/avda_shared_state.h
[modify] https://crrev.com/68ec57f3e3114a39ea147c7fe956fa3b9d3a601d/media/gpu/avda_state_provider.h

Status: Fixed (was: Assigned)

Sign in to add a comment