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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2883913003: Add multiple destruction callbacks to AndroidOverlay. (Closed)
Patch Set: rebased.... though i got not conflicts? Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/base/android_overlay_config.h ('k') | media/gpu/android_video_decode_accelerator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/android_video_decode_accelerator.cc
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc
index 6b2faa2c3c4c9f378ebb57de9854c136f47728d1..470b8d825f95fde1cc741e8c3d68d16431969175 100644
--- a/media/gpu/android_video_decode_accelerator.cc
+++ b/media/gpu/android_video_decode_accelerator.cc
@@ -427,13 +427,17 @@ void AndroidVideoDecodeAccelerator::StartSurfaceChooser() {
weak_this_factory_.GetWeakPtr()),
base::Bind(&AndroidVideoDecodeAccelerator::OnSurfaceTransition,
weak_this_factory_.GetWeakPtr(), nullptr),
- base::Bind(&AndroidVideoDecodeAccelerator::OnStopUsingOverlayImmediately,
- weak_this_factory_.GetWeakPtr()),
std::move(factory));
}
void AndroidVideoDecodeAccelerator::OnSurfaceTransition(
std::unique_ptr<AndroidOverlay> overlay) {
+ if (overlay) {
+ overlay->AddSurfaceDestroyedCallback(base::Bind(
+ &AndroidVideoDecodeAccelerator::OnStopUsingOverlayImmediately,
+ weak_this_factory_.GetWeakPtr()));
+ }
+
// If we're waiting for a surface (e.g., during startup), then proceed
// immediately. Otherwise, wait for Dequeue to handle it. This can probably
// be merged with UpdateSurface.
« no previous file with comments | « media/base/android_overlay_config.h ('k') | media/gpu/android_video_decode_accelerator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698