Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: cc/resources/video_resource_updater.cc

Issue 14925009: Run all LayerTreeHost tests with a delegating renderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix context tests Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
}

Powered by Google App Engine
This is Rietveld 408576698