| Index: media/gpu/avda_picture_buffer_manager.cc
|
| diff --git a/media/gpu/avda_picture_buffer_manager.cc b/media/gpu/avda_picture_buffer_manager.cc
|
| index a77de5a1b6cc912f01424b3ad120b7b0b5b18f97..1509ad0999f554e6cc7a9f33c6c89c060147d787 100644
|
| --- a/media/gpu/avda_picture_buffer_manager.cc
|
| +++ b/media/gpu/avda_picture_buffer_manager.cc
|
| @@ -81,15 +81,11 @@ AVDAPictureBufferManager::~AVDAPictureBufferManager() {}
|
|
|
| gl::ScopedJavaSurface AVDAPictureBufferManager::Initialize(int surface_id) {
|
| shared_state_ = new AVDASharedState();
|
| + surface_texture_ = nullptr;
|
|
|
| // Acquire the SurfaceView surface if given a valid id.
|
| - if (surface_id != SurfaceManager::kNoSurfaceID) {
|
| - if (surface_texture_) {
|
| - surface_texture_->ReleaseSurfaceTexture();
|
| - surface_texture_ = nullptr;
|
| - }
|
| + if (surface_id != SurfaceManager::kNoSurfaceID)
|
| return gpu::GpuSurfaceLookup::GetInstance()->AcquireJavaSurface(surface_id);
|
| - }
|
|
|
| // Otherwise create a SurfaceTexture.
|
| GLuint service_id;
|
| @@ -106,11 +102,7 @@ void AVDAPictureBufferManager::Destroy(const PictureBufferMap& buffers) {
|
|
|
| ReleaseCodecBuffers(buffers);
|
| CodecChanged(nullptr);
|
| -
|
| - // Release the surface texture and any back buffers. This will preserve the
|
| - // front buffer, if any.
|
| - if (surface_texture_)
|
| - surface_texture_->ReleaseSurfaceTexture();
|
| + surface_texture_ = nullptr;
|
| }
|
|
|
| void AVDAPictureBufferManager::SetImageForPicture(
|
|
|