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

Unified Diff: content/common/gpu/media/avda_codec_image.cc

Issue 1910063005: Store AVDACodecImage list in shared state, cleanup callers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: It lives! Created 4 years, 8 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/common/gpu/media/avda_codec_image.cc
diff --git a/content/common/gpu/media/avda_codec_image.cc b/content/common/gpu/media/avda_codec_image.cc
index cd9ec57bcc4ec12ce5daf5dd291be6c914fbc684..8f3595a69c91496dd01dbfc098f03a543b8b08b7 100644
--- a/content/common/gpu/media/avda_codec_image.cc
+++ b/content/common/gpu/media/avda_codec_image.cc
@@ -39,7 +39,9 @@ AVDACodecImage::AVDACodecImage(
gl_matrix_[5] = -1.0f;
}
-AVDACodecImage::~AVDACodecImage() {}
+AVDACodecImage::~AVDACodecImage() {
+ shared_state_->EraseImage(this);
+}
void AVDACodecImage::Destroy(bool have_context) {}
@@ -174,6 +176,7 @@ void AVDACodecImage::SetSize(const gfx::Size& size) {
void AVDACodecImage::SetMediaCodec(media::MediaCodecBridge* codec) {
liberato (no reviews please) 2016/04/21 23:39:54 maybe rename to CodecChanged, since it also resets
DaleCurtis 2016/04/22 00:11:19 Done.
media_codec_ = codec;
+ codec_buffer_index_ = -1;
watk 2016/04/21 20:45:01 kInvalidCodecBufferIndex?
DaleCurtis 2016/04/22 00:11:21 Done.
}
void AVDACodecImage::SetTexture(gpu::gles2::Texture* texture) {

Powered by Google App Engine
This is Rietveld 408576698