| 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 d1416a11c527ac2e369c48dcd666136bc0308422..0cf96f67330f15cf965f41b949effeb6be93a559 100644
|
| --- a/media/gpu/android_video_decode_accelerator.cc
|
| +++ b/media/gpu/android_video_decode_accelerator.cc
|
| @@ -37,7 +37,6 @@
|
| #include "media/gpu/android_video_surface_chooser_impl.h"
|
| #include "media/gpu/avda_picture_buffer_manager.h"
|
| #include "media/gpu/content_video_view_overlay.h"
|
| -#include "media/gpu/content_video_view_overlay_factory.h"
|
| #include "media/gpu/shared_memory_region.h"
|
| #include "media/video/picture.h"
|
| #include "ui/gl/android/scoped_java_surface.h"
|
| @@ -122,6 +121,13 @@ bool ShouldDeferSurfaceCreation(
|
| platform_config.sdk_int <= 18);
|
| }
|
|
|
| +std::unique_ptr<AndroidOverlay> CreateContentVideoViewOverlay(
|
| + int32_t surface_id,
|
| + AndroidOverlayConfig config) {
|
| + return base::MakeUnique<ContentVideoViewOverlay>(surface_id,
|
| + std::move(config));
|
| +}
|
| +
|
| } // namespace
|
|
|
| // AVDAManager manages a RepeatingTimer so that AVDAs can get a regular callback
|
| @@ -402,11 +408,9 @@ void AndroidVideoDecodeAccelerator::StartSurfaceChooser() {
|
| }
|
|
|
| // If we have a surface, then notify |surface_chooser_| about it.
|
| - std::unique_ptr<AndroidOverlayFactory> factory;
|
| - if (config_.surface_id != SurfaceManager::kNoSurfaceID) {
|
| - factory =
|
| - base::MakeUnique<ContentVideoViewOverlayFactory>(config_.surface_id);
|
| - }
|
| + AndroidOverlayFactoryCB factory;
|
| + if (config_.surface_id != SurfaceManager::kNoSurfaceID)
|
| + factory = base::Bind(&CreateContentVideoViewOverlay, config_.surface_id);
|
|
|
| // Notify |surface_chooser_| that we've started. This guarantees that we'll
|
| // get a callback. It might not be a synchronous callback, but we're not in
|
| @@ -1274,9 +1278,9 @@ void AndroidVideoDecodeAccelerator::SetSurface(int32_t surface_id) {
|
| return;
|
| }
|
|
|
| - std::unique_ptr<AndroidOverlayFactory> factory;
|
| + AndroidOverlayFactoryCB factory;
|
| if (surface_id != SurfaceManager::kNoSurfaceID)
|
| - factory = base::MakeUnique<ContentVideoViewOverlayFactory>(surface_id);
|
| + factory = base::Bind(&CreateContentVideoViewOverlay, surface_id);
|
|
|
| surface_chooser_->ReplaceOverlayFactory(std::move(factory));
|
| }
|
|
|