OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |