Chromium Code Reviews
DescriptionGroup AVDA output surface into AVDASurfaceBundle.
AVDASurfaceBundle holds the surface and/or SurfaceTexture that a
MediaCodec instance is using. A reference to it is kept with the
codec, so that we don't destroy the output surface before the codec.
Keeping a reference to the surface bundle replaces the explicit post
of the SurfaceTexture during AVDA::ActualDestroy. All calls to
ReleaseCodec send a reference to the SurfaceBundle along with the
codec. The bundle also is replaced in UpdateSurface (the only time
that AVDA can change surfaces), so that failed calls to SetSurface
are easier to recover from.
Note that it other things (e.g., shared state) may still hold a
reference to the SurfaceTexture itself, so that the GL texture will
also outlast the GLImages.
BUG=
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/2707703002
Cr-Commit-Position: refs/heads/master@{#455511}
Committed: https://chromium.googlesource.com/chromium/src/+/5e0962e514794c20d7c5fb614f7b7d0589177fb7
Patch Set 1 #Patch Set 2 : added AVDASurfaceBundle #Patch Set 3 : fixed a comment #Patch Set 4 : added a comment #Patch Set 5 : added incoming bundle #Patch Set 6 : maybe don't initialize surface_id from itself #Patch Set 7 : factored out two assignments #Patch Set 8 : comments #Patch Set 9 : rebased #Patch Set 10 : release codec safely if client is gone #Patch Set 11 : stopped keeping a ref to codec_config #Patch Set 12 : cleanup #Patch Set 13 : minor fixes after testing #
Total comments: 26
Patch Set 14 : cl feedback #
Total comments: 2
Patch Set 15 : started releasing st #Patch Set 16 : rebased #Patch Set 17 : check for surface_texture == null #Patch Set 18 : rebased #
Messages
Total messages: 36 (27 generated)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||