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

Unified Diff: cc/layers/video_layer.cc

Issue 21567003: cc: Fix accelerated video freezing with commit aborts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add test; update comment Created 7 years, 5 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 | « cc/layers/video_layer.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/video_layer.cc
diff --git a/cc/layers/video_layer.cc b/cc/layers/video_layer.cc
index 5066835227d2c2575d6277f53843ea2bdb021d6a..6cba239e0226f9b9ccf1b0f4013cbf288bcd3e96 100644
--- a/cc/layers/video_layer.cc
+++ b/cc/layers/video_layer.cc
@@ -22,4 +22,14 @@ scoped_ptr<LayerImpl> VideoLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) {
return VideoLayerImpl::Create(tree_impl, id(), provider_).PassAs<LayerImpl>();
}
+bool VideoLayer::Update(ResourceUpdateQueue* queue,
+ const OcclusionTracker* occlusion) {
+ // Video layer doesn't update any resources from the main thread side,
+ // but repaint rects need to be sent to the VideoLayerImpl via commit.
+ //
+ // This is the inefficient legacy redraw path for videos. It's better to
+ // communicate this directly to the VideoLayerImpl.
+ return !update_rect_.IsEmpty();
+}
+
} // namespace cc
« no previous file with comments | « cc/layers/video_layer.h ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698