New issue
Advanced search Search tips

Issue 710204 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: May 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 618368
issue 710206



Sign in to add a comment

Replace surface_id with AndroidOverlay in AVDA

Project Member Reported by liber...@chromium.org, Apr 10 2017

Issue description

AVDA currently gets a surface_id from wmpi, and uses it to retrieve an AndroidOverlay.  this should be extracted to a helper class that's reusable between AVDA and MCVD.

the hlper should provide avda with "use this unique_ptr<overlay>" call.  it should hide surfaceReady, so that AVDA is provided with an overlay that's ready to use immediately.

this doesn't include making it smarter (compositor feedback).  it should just do what AVDA does now, with a better API.
 
Blocking: 710206
Project Member

Comment 2 by bugdroid1@chromium.org, May 3 2017

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

commit 9432ee01aaa7821c3ea5cbff746a969a0725a34b
Author: liberato <liberato@chromium.org>
Date: Wed May 03 07:18:11 2017

Add AndroidVideoSurfaceChooser to manage overlays.

This CL abstracts out much of the surface-switching logic from AVDA
into AndroidVideoSurfaceChooser.  It also handles talking to overlay
factories that will be provided by the renderer.

AndroidVideoSurfaceChooser notifies AVDA about when to transition to
/ from an overlay.  Currently, this is based only on whether the
renderer has provided an overlay factory or not.  In the future,
this will look at compositor feedback and other hints to decide.

This CL also adds lots of tests for this behavior.  Previously, it
wasn't easy to test surface transitions since (a) they were bundled
into AVDA itself, and (b) they directly depended on hard-to-mock
classes like ScopedJavaSurface.  Now, AndroidVideoSurfaceChooser
abstracts the logic, and AVDA no longer directly deals with any of
those hard-to-mock objects.

BUG= 710204 
TEST=AndroidVideoDecodeAcceleratorTest, AndroidVideoSurfaceChooserImplTest
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

Review-Url: https://codereview.chromium.org/2813303003
Cr-Commit-Position: refs/heads/master@{#468916}

[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/base/android/BUILD.gn
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/base/android/mock_android_overlay.cc
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/base/android/mock_android_overlay.h
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/base/android/mock_media_codec_bridge.h
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/base/android/test_destruction_observable.cc
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/base/android/test_destruction_observable.h
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/BUILD.gn
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/android_video_decode_accelerator.cc
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/android_video_decode_accelerator.h
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/android_video_decode_accelerator_unittest.cc
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/android_video_surface_chooser.h
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/android_video_surface_chooser_impl.cc
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/android_video_surface_chooser_impl.h
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/android_video_surface_chooser_impl_unittest.cc
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/avda_codec_allocator.h
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/avda_surface_bundle.cc
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/avda_surface_bundle.h
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/content_video_view_overlay_factory.cc
[add] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/content_video_view_overlay_factory.h
[modify] https://crrev.com/9432ee01aaa7821c3ea5cbff746a969a0725a34b/media/gpu/gpu_video_decode_accelerator_factory.cc

Status: Fixed (was: Available)

Sign in to add a comment