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

Unified Diff: media/gpu/android_video_decode_accelerator.cc

Issue 2856253004: removed AndroidOverlayFactory (Closed)
Patch Set: removed some java refs 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
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..b4ddbfadde3566759c2042d048b6d3e53ecbc01d 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,10 +408,9 @@ void AndroidVideoDecodeAccelerator::StartSurfaceChooser() {
}
// If we have a surface, then notify |surface_chooser_| about it.
- std::unique_ptr<AndroidOverlayFactory> factory;
+ AndroidOverlayFactoryCB factory;
if (config_.surface_id != SurfaceManager::kNoSurfaceID) {
- factory =
- base::MakeUnique<ContentVideoViewOverlayFactory>(config_.surface_id);
+ factory = base::Bind(&CreateContentVideoViewOverlay, config_.surface_id);
tguilbert 2017/05/04 21:52:04 NIT: Remove brackets for single line if
liberato (no reviews please) 2017/05/05 16:50:23 Done.
}
// Notify |surface_chooser_| that we've started. This guarantees that we'll
@@ -1274,9 +1279,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));
}

Powered by Google App Engine
This is Rietveld 408576698