| Index: cc/resources/video_resource_updater.cc
|
| diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
|
| index 9aa3644f1744699c694928c506c945d097fe5941..980b9c723fa55d5a2f40c55f7d608aec23e2e385 100644
|
| --- a/cc/resources/video_resource_updater.cc
|
| +++ b/cc/resources/video_resource_updater.cc
|
| @@ -357,9 +357,12 @@ void VideoResourceUpdater::RecycleResource(
|
| bool lost_resource) {
|
| WebKit::WebGraphicsContext3D* context =
|
| resource_provider->GraphicsContext3D();
|
| - if (context && sync_point)
|
| + if (lost_resource)
|
| + return;
|
| +
|
| + if (context) {
|
| + if (sync_point)
|
| GLC(context, context->waitSyncPoint(sync_point));
|
| - if (context && !lost_resource) {
|
| ResourceProvider::ScopedWriteLockGL lock(resource_provider,
|
| data.resource_id);
|
| GLC(context, context->bindTexture(GL_TEXTURE_2D, lock.texture_id()));
|
| @@ -368,7 +371,7 @@ void VideoResourceUpdater::RecycleResource(
|
| GLC(context, context->bindTexture(GL_TEXTURE_2D, 0));
|
| }
|
|
|
| - if (!updater || lost_resource) {
|
| + if (!updater) {
|
| resource_provider->DeleteResource(data.resource_id);
|
| return;
|
| }
|
|
|