Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Issue 2707703002: Group AVDA output surface into AVDASurfaceBundle. (Closed)

Created:
3 years, 10 months ago by liberato (no reviews please)
Modified:
3 years, 9 months ago
Reviewers:
watk
CC:
chromium-reviews, posciak+watch_chromium.org, piman+watch_chromium.org, feature-media-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Group 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+230 lines, -68 lines) Patch
M media/gpu/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +22 lines, -4 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15 chunks +56 lines, -35 lines 0 comments Download
M media/gpu/avda_codec_allocator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +23 lines, -11 lines 0 comments Download
M media/gpu/avda_codec_allocator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +57 lines, -18 lines 0 comments Download
A media/gpu/avda_surface_bundle.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +48 lines, -0 lines 0 comments Download
A media/gpu/avda_surface_bundle.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +22 lines, -0 lines 0 comments Download

Messages

Total messages: 36 (27 generated)
liberato (no reviews please)
i did a lot of manual testing. handles updatesurface / no updatesurface. made avda NotifyError ...
3 years, 10 months ago (2017-02-22 01:27:05 UTC) #19
watk
Nice one, I mostly had nits. Also I should have done this when I fixed ...
3 years, 10 months ago (2017-02-22 20:38:56 UTC) #20
liberato (no reviews please)
thanks for the comments. -fl https://codereview.chromium.org/2707703002/diff/240001/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2707703002/diff/240001/media/gpu/android_video_decode_accelerator.cc#newcode442 media/gpu/android_video_decode_accelerator.cc:442: state_ = NO_ERROR; On ...
3 years, 10 months ago (2017-02-23 18:18:47 UTC) #21
watk
https://codereview.chromium.org/2707703002/diff/240001/media/gpu/avda_surface_bundle.cc File media/gpu/avda_surface_bundle.cc (right): https://codereview.chromium.org/2707703002/diff/240001/media/gpu/avda_surface_bundle.cc#newcode16 media/gpu/avda_surface_bundle.cc:16: surface_texture = nullptr; On 2017/02/23 18:18:46, liberato wrote: > ...
3 years, 10 months ago (2017-02-23 20:03:47 UTC) #22
liberato (no reviews please)
https://codereview.chromium.org/2707703002/diff/240001/media/gpu/avda_surface_bundle.cc File media/gpu/avda_surface_bundle.cc (right): https://codereview.chromium.org/2707703002/diff/240001/media/gpu/avda_surface_bundle.cc#newcode16 media/gpu/avda_surface_bundle.cc:16: surface_texture = nullptr; On 2017/02/23 20:03:47, watk wrote: > ...
3 years, 9 months ago (2017-03-06 22:59:36 UTC) #23
watk
I forgot about this. My last review said it looked mostly good though, so I'll ...
3 years, 9 months ago (2017-03-06 23:03:44 UTC) #24
liberato (no reviews please)
On 2017/03/06 23:03:44, watk wrote: > I forgot about this. My last review said it ...
3 years, 9 months ago (2017-03-06 23:07:27 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2707703002/340001
3 years, 9 months ago (2017-03-08 19:15:33 UTC) #33
commit-bot: I haz the power
3 years, 9 months ago (2017-03-08 19:22:20 UTC) #36
Message was sent while issue was closed.
Committed patchset #18 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/5e0962e514794c20d7c5fb614f7b...

Powered by Google App Engine
This is Rietveld 408576698