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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 22824009: Remove StreamTextureManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 4 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: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 4c6b4aad89b8d8639dfc62e8a34040669af21202..7ebcd990061c1c48bef9fdafde6b320f2ed38252 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -162,8 +162,10 @@ WebMediaPlayerAndroid::~WebMediaPlayerAndroid() {
if (proxy_)
proxy_->DestroyPlayer(player_id_);
- if (stream_id_)
- stream_texture_factory_->DestroyStreamTexture(texture_id_);
+ if (stream_id_) {
+ DCHECK(texture_id_);
+ stream_texture_factory_->DestroyStreamTexture(stream_id_, texture_id_);
+ }
if (manager_)
manager_->UnregisterMediaPlayer(player_id_);
@@ -784,7 +786,8 @@ void WebMediaPlayerAndroid::WillDestroyCurrentMessageLoop() {
void WebMediaPlayerAndroid::Detach() {
if (stream_id_) {
- stream_texture_factory_->DestroyStreamTexture(texture_id_);
+ DCHECK(texture_id_);
+ stream_texture_factory_->DestroyStreamTexture(stream_id_, texture_id_);
stream_id_ = 0;
}
@@ -852,7 +855,8 @@ void WebMediaPlayerAndroid::EstablishSurfaceTexturePeer() {
if (media_source_delegate_ && stream_texture_factory_) {
// MediaCodec will release the old surface when it goes away, we need to
// recreate a new one each time this is called.
- stream_texture_factory_->DestroyStreamTexture(texture_id_);
+ DCHECK(stream_id_ && texture_id_);
+ stream_texture_factory_->DestroyStreamTexture(stream_id_, texture_id_);
stream_id_ = 0;
texture_id_ = 0;
texture_mailbox_ = gpu::Mailbox();
« no previous file with comments | « content/renderer/media/android/stream_texture_factory_android.cc ('k') | gpu/command_buffer/service/context_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698