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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 1113283002: cc: Send BeginFrame to VideoFrameController when added if we're inside a frame. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add tests. Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 3066 matching lines...) Expand 10 before | Expand all | Expand 10 after
3077 } 3077 }
3078 3078
3079 void LayerTreeHostImpl::SetNeedsRedrawForScrollbarAnimation() { 3079 void LayerTreeHostImpl::SetNeedsRedrawForScrollbarAnimation() {
3080 SetNeedsRedraw(); 3080 SetNeedsRedraw();
3081 } 3081 }
3082 3082
3083 void LayerTreeHostImpl::AddVideoFrameController( 3083 void LayerTreeHostImpl::AddVideoFrameController(
3084 VideoFrameController* controller) { 3084 VideoFrameController* controller) {
3085 bool was_empty = video_frame_controllers_.empty(); 3085 bool was_empty = video_frame_controllers_.empty();
3086 video_frame_controllers_.insert(controller); 3086 video_frame_controllers_.insert(controller);
3087 if (current_begin_frame_args_.IsValid())
3088 controller->OnBeginFrame(current_begin_frame_args_);
brianderson 2015/05/04 23:39:47 Not that the controller is really going to care, b
sunnyps 2015/05/04 23:41:06 Yeah, let's hold off on this until we need it.
3087 if (was_empty) 3089 if (was_empty)
3088 client_->SetVideoNeedsBeginFrames(true); 3090 client_->SetVideoNeedsBeginFrames(true);
3089 } 3091 }
3090 3092
3091 void LayerTreeHostImpl::RemoveVideoFrameController( 3093 void LayerTreeHostImpl::RemoveVideoFrameController(
3092 VideoFrameController* controller) { 3094 VideoFrameController* controller) {
3093 video_frame_controllers_.erase(controller); 3095 video_frame_controllers_.erase(controller);
3094 if (video_frame_controllers_.empty()) 3096 if (video_frame_controllers_.empty())
3095 client_->SetVideoNeedsBeginFrames(false); 3097 client_->SetVideoNeedsBeginFrames(false);
3096 } 3098 }
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
3374 new_target.SetToMin(layer_impl->MaxScrollOffset()); 3376 new_target.SetToMin(layer_impl->MaxScrollOffset());
3375 3377
3376 curve->UpdateTarget( 3378 curve->UpdateTarget(
3377 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time) 3379 animation->TrimTimeToCurrentIteration(CurrentBeginFrameArgs().frame_time)
3378 .InSecondsF(), 3380 .InSecondsF(),
3379 new_target); 3381 new_target);
3380 3382
3381 return true; 3383 return true;
3382 } 3384 }
3383 } // namespace cc 3385 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_frame_provider_client_impl.cc ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698