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

Unified Diff: media/gpu/android_video_surface_chooser_impl.cc

Issue 2856253004: removed AndroidOverlayFactory (Closed)
Patch Set: cl feedvback 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_surface_chooser_impl.cc
diff --git a/media/gpu/android_video_surface_chooser_impl.cc b/media/gpu/android_video_surface_chooser_impl.cc
index d1df41371d873bc61f3bcdcb43c305794080e37d..486a274b527a0d78ce332ca316996d17f6b3ce23 100644
--- a/media/gpu/android_video_surface_chooser_impl.cc
+++ b/media/gpu/android_video_surface_chooser_impl.cc
@@ -15,7 +15,7 @@ void AndroidVideoSurfaceChooserImpl::Initialize(
UseOverlayCB use_overlay_cb,
UseSurfaceTextureCB use_surface_texture_cb,
StopUsingOverlayImmediatelyCB stop_immediately_cb,
- std::unique_ptr<AndroidOverlayFactory> initial_factory) {
+ AndroidOverlayFactoryCB initial_factory) {
use_overlay_cb_ = std::move(use_overlay_cb);
use_surface_texture_cb_ = std::move(use_surface_texture_cb);
stop_immediately_cb_ = std::move(stop_immediately_cb);
@@ -39,7 +39,7 @@ void AndroidVideoSurfaceChooserImpl::Initialize(
}
void AndroidVideoSurfaceChooserImpl::ReplaceOverlayFactory(
- std::unique_ptr<AndroidOverlayFactory> factory) {
+ AndroidOverlayFactoryCB factory) {
// If we have an overlay, then we should transition away from it. It
// doesn't matter if we have a new factory or no factory; the old overlay goes
// with the old factory.
@@ -69,7 +69,7 @@ void AndroidVideoSurfaceChooserImpl::ReplaceOverlayFactory(
// a SurfaceTexture then be unable to switch. Perhaps there should be a
// pre-M implementation of this class that guarantees that it won't change
// between the two.
- AndroidOverlay::Config config;
+ AndroidOverlayConfig config;
// We bind all of our callbacks with weak ptrs, since we don't know how long
// the client will hold on to overlays. They could, in principle, show up
// long after the client is destroyed too, if codec destruction hangs.
@@ -85,7 +85,7 @@ void AndroidVideoSurfaceChooserImpl::ReplaceOverlayFactory(
// set via the natural size, and this is ignored anyway. The client should
// provide this.
config.rect = gfx::Rect(0, 0, 1, 1);
- overlay_ = overlay_factory_->CreateOverlay(config);
+ overlay_ = overlay_factory_.Run(std::move(config));
}
void AndroidVideoSurfaceChooserImpl::OnOverlayReady(AndroidOverlay* overlay) {

Powered by Google App Engine
This is Rietveld 408576698