| Index: cc/resources/video_resource_updater.cc
|
| diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
|
| index e77cd7505af1c58cecfbfe1f07bb0d32f9641a01..704d6701cc5061a1a8f5126adf0dbb31cd6944e6 100644
|
| --- a/cc/resources/video_resource_updater.cc
|
| +++ b/cc/resources/video_resource_updater.cc
|
| @@ -219,11 +219,13 @@ VideoResourceUpdater::AllocateResource(const gfx::Size& plane_size,
|
| gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
|
|
|
| gl->GenMailboxCHROMIUM(mailbox.name);
|
| - ResourceProvider::ScopedWriteLockGL lock(resource_provider_, resource_id);
|
| + ResourceProvider::ScopedWriteLockGL lock(resource_provider_, resource_id,
|
| + false);
|
| gl->ProduceTextureDirectCHROMIUM(
|
| - lock.texture_id(),
|
| + lock.ProduceTextureId(),
|
| resource_provider_->GetResourceTextureTarget(resource_id),
|
| mailbox.name);
|
| + lock.ReleaseTextureId();
|
| }
|
| all_resources_.push_front(
|
| PlaneResource(resource_id, plane_size, format, mailbox));
|
| @@ -629,8 +631,8 @@ void VideoResourceUpdater::CopyPlaneTexture(
|
| ++resource->ref_count;
|
|
|
| ResourceProvider::ScopedWriteLockGL lock(resource_provider_,
|
| - resource->resource_id);
|
| - uint32_t texture_id = lock.texture_id();
|
| + resource->resource_id, false);
|
| + uint32_t texture_id = lock.ProduceTextureId();
|
|
|
| DCHECK_EQ(resource_provider_->GetResourceTextureTarget(resource->resource_id),
|
| (GLenum)GL_TEXTURE_2D);
|
| @@ -650,6 +652,8 @@ void VideoResourceUpdater::CopyPlaneTexture(
|
| gl->ShallowFlushCHROMIUM();
|
| gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
|
|
|
| + lock.ReleaseTextureId();
|
| +
|
| // Done with the source video frame texture at this point.
|
| video_frame->UpdateReleaseSyncToken(&client);
|
|
|
|
|