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

Unified Diff: cc/layers/video_layer_impl.cc

Issue 13959005: cc: Recycle resources for software video decode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Destroy recycled textures when VRU shuts down Created 7 years, 8 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
« no previous file with comments | « no previous file | cc/resources/video_resource_updater.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/video_layer_impl.cc
diff --git a/cc/layers/video_layer_impl.cc b/cc/layers/video_layer_impl.cc
index 233abce7e0f0276314eb6bf117c20675dbd65adc..8ea0075197c8f945dd9812b83076b64a713facbf 100644
--- a/cc/layers/video_layer_impl.cc
+++ b/cc/layers/video_layer_impl.cc
@@ -83,6 +83,9 @@ void VideoLayerImpl::WillDraw(ResourceProvider* resource_provider) {
frame_ = provider_client_impl_->AcquireLockAndCurrentFrame();
if (!frame_) {
+ // Drop any resources used by the updater if there is no frame to display.
+ updater_.reset();
+
provider_client_impl_->ReleaseLock();
return;
}
« no previous file with comments | « no previous file | cc/resources/video_resource_updater.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698