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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 1039533002: cc: Add support for sending BeginFrames for video. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@misc_video_refactoring
Patch Set: Fix comment. Created 5 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 | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 7b5c262d42f20aa3110d6849693f5b34b76aeea3..7f40c98e8cf23dc862ee34859077022ae1142fa8 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1653,6 +1653,9 @@ void LayerTreeHostImpl::WillBeginImplFrame(const BeginFrameArgs& args) {
// we are beginning now.
SetNeedsRedraw();
}
+
+ for (auto& it : video_frame_controllers_)
+ it->OnBeginFrame(args);
}
void LayerTreeHostImpl::UpdateViewportContainerSizes() {
@@ -3070,6 +3073,21 @@ void LayerTreeHostImpl::SetNeedsRedrawForScrollbarAnimation() {
SetNeedsRedraw();
}
+void LayerTreeHostImpl::AddVideoFrameController(
+ VideoFrameController* controller) {
+ bool was_empty = video_frame_controllers_.empty();
+ video_frame_controllers_.insert(controller);
+ if (was_empty)
+ client_->SetVideoNeedsBeginFrames(true);
+}
+
+void LayerTreeHostImpl::RemoveVideoFrameController(
+ VideoFrameController* controller) {
+ video_frame_controllers_.erase(controller);
+ if (video_frame_controllers_.empty())
+ client_->SetVideoNeedsBeginFrames(false);
+}
+
void LayerTreeHostImpl::SetTreePriority(TreePriority priority) {
if (!tile_manager_)
return;
« no previous file with comments | « cc/trees/layer_tree_host_impl.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698