summaryrefslogtreecommitdiffstats
path: root/cc/resources/video_resource_updater.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/resources/video_resource_updater.cc')
-rw-r--r--cc/resources/video_resource_updater.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index 1b60d0b..4239e98 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -197,9 +197,6 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
DCHECK(mailbox.IsZero());
if (!software_compositor) {
- ResourceProvider::ScopedWriteLockGL lock(
- resource_provider_, resource_id);
-
WebKit::WebGraphicsContext3D* context =
resource_provider_->GraphicsContext3D();
DCHECK(context);
@@ -209,6 +206,8 @@ VideoFrameExternalResources VideoResourceUpdater::CreateForSoftwarePlanes(
resource_provider_->DeleteResource(resource_id);
resource_id = 0;
} else {
+ ResourceProvider::ScopedWriteLockGL lock(
+ resource_provider_, resource_id);
GLC(context, context->bindTexture(GL_TEXTURE_2D, lock.texture_id()));
GLC(context, context->produceTextureCHROMIUM(GL_TEXTURE_2D,
mailbox.name));