Chromium Code Reviews| Index: content/common/gpu/media/avda_shared_state.cc |
| diff --git a/content/common/gpu/media/avda_shared_state.cc b/content/common/gpu/media/avda_shared_state.cc |
| index c182bf0538593f17bb80cb237a6a2addaf678a71..bfcc164714fe5b2aee4d4c333a114c097c58e567 100644 |
| --- a/content/common/gpu/media/avda_shared_state.cc |
| +++ b/content/common/gpu/media/avda_shared_state.cc |
| @@ -14,7 +14,14 @@ AVDASharedState::AVDASharedState() |
| frame_available_event_(false, false), |
| surface_texture_is_attached_(false) {} |
| -AVDASharedState::~AVDASharedState() {} |
| +AVDASharedState::~AVDASharedState() { |
|
liberato (no reviews please)
2016/02/10 21:05:15
i think that you have to maintain a list of Textur
watk
2016/02/11 00:26:51
Discussed offline that this is not necessary becau
|
| + if (surface_texture_service_id_ != 0 && context_) { |
|
liberato (no reviews please)
2016/02/10 21:05:15
it might be worthwhile to pass in the avda's conte
|
| + // XXX: This is the wrong context. |
|
liberato (no reviews please)
2016/02/10 06:39:12
it's worth a comment that it's a different one tha
watk
2016/02/11 00:26:51
Ah, that's why everything works, thanks.
|
| + auto scoped_make_current = make_scoped_ptr( |
| + new ui::ScopedMakeCurrent(context_.get(), surface_.get())); |
| + glDeleteTextures(1, &surface_texture_service_id_); |
| + } |
| +} |
| void AVDASharedState::SignalFrameAvailable() { |
| frame_available_event_.Signal(); |
| @@ -24,7 +31,7 @@ void AVDASharedState::WaitForFrameAvailable() { |
| frame_available_event_.Wait(); |
| } |
| -void AVDASharedState::did_attach_surface_texture() { |
| +void AVDASharedState::DidAttachSurfaceTexture() { |
| context_ = gfx::GLContext::GetCurrent(); |
| surface_ = gfx::GLSurface::GetCurrent(); |
| DCHECK(context_); |