DescriptionAdd 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}
Committed: https://chromium.googlesource.com/chromium/src/+/9432ee01aaa7821c3ea5cbff746a969a0725a34b
Patch Set 1 #Patch Set 2 : lots of fixes #Patch Set 3 : more cleanup #Patch Set 4 : rebased. #Patch Set 5 : added avda tests #Patch Set 6 : avda tests, removed debug. #Patch Set 7 : overlay helper tests #Patch Set 8 : more overlay helper tests #Patch Set 9 : added media/base/android::test_support target #Patch Set 10 : gn fixes for non-android #
Total comments: 42
Patch Set 11 : cl feedback. #
Total comments: 20
Patch Set 12 : removed most weak factories #
Total comments: 10
Patch Set 13 : GetWeakPtr => weak_this_factory_.GetWeakPtr #Patch Set 14 : factored out DestructionObserver for MediaCodec too. #Patch Set 15 : GetWeakPtr => GetWeakPtrForTesting #Patch Set 16 : simplified avda tests #Patch Set 17 : from ps11 #
Total comments: 41
Patch Set 18 : std::move for callbacks #Patch Set 19 : watk's feedback from ps17 #Patch Set 20 : OnOverlayTransition => OnSurfaceTransition #
Total comments: 8
Patch Set 21 : cl feedback #Patch Set 22 : fixed AVDAManager comment #
Total comments: 16
Patch Set 23 : cl feedback #
Total comments: 10
Patch Set 24 : cl feedback #Patch Set 25 : fixed dereference of base::Optional #Messages
Total messages: 60 (33 generated)
|