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

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: rebase 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..22fc8591f53d6b8b30e4e0b0a01d1d35cf50754f 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -355,10 +355,15 @@ void VideoResourceUpdater::RecycleResource(
RecycleResourceData data,
unsigned sync_point,
bool lost_resource) {
+ if (!updater) {
+ // Resource was already deleted.
+ return;
+ }
+
WebKit::WebGraphicsContext3D* context =
resource_provider->GraphicsContext3D();
if (context && sync_point)
- GLC(context, context->waitSyncPoint(sync_point));
+ GLC(context, context->waitSyncPoint(sync_point));
if (context && !lost_resource) {
ResourceProvider::ScopedWriteLockGL lock(resource_provider,
data.resource_id);
@@ -368,7 +373,7 @@ void VideoResourceUpdater::RecycleResource(
GLC(context, context->bindTexture(GL_TEXTURE_2D, 0));
}
- if (!updater || lost_resource) {
+ if (lost_resource) {
resource_provider->DeleteResource(data.resource_id);
return;
}

Powered by Google App Engine
This is Rietveld 408576698