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 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
420 &memory_nice_to_have_bytes, | 420 &memory_nice_to_have_bytes, |
421 &memory_allocated_bytes, | 421 &memory_allocated_bytes, |
422 &memory_used_bytes); | 422 &memory_used_bytes); |
423 SendManagedMemoryStats(memory_required_bytes, | 423 SendManagedMemoryStats(memory_required_bytes, |
424 memory_nice_to_have_bytes, | 424 memory_nice_to_have_bytes, |
425 memory_used_bytes); | 425 memory_used_bytes); |
426 | 426 |
427 client_->DidManageTiles(); | 427 client_->DidManageTiles(); |
428 } | 428 } |
429 | 429 |
430 void LayerTreeHostImpl::StartPageScaleAnimation(gfx::Vector2d target_offset, | 430 void LayerTreeHostImpl::StartPageScaleAnimation( |
431 bool anchor_point, | 431 const gfx::Vector2d& target_offset, |
432 float page_scale, | 432 bool anchor_point, |
433 base::TimeDelta duration) { | 433 float page_scale, |
| 434 base::TimeDelta duration) { |
434 if (!InnerViewportScrollLayer()) | 435 if (!InnerViewportScrollLayer()) |
435 return; | 436 return; |
436 | 437 |
437 gfx::Vector2dF scroll_total = active_tree_->TotalScrollOffset(); | 438 gfx::Vector2dF scroll_total = active_tree_->TotalScrollOffset(); |
438 gfx::SizeF scaled_scrollable_size = active_tree_->ScrollableSize(); | 439 gfx::SizeF scaled_scrollable_size = active_tree_->ScrollableSize(); |
439 gfx::SizeF viewport_size = UnscaledScrollableViewportSize(); | 440 gfx::SizeF viewport_size = UnscaledScrollableViewportSize(); |
440 | 441 |
441 // Easing constants experimentally determined. | 442 // Easing constants experimentally determined. |
442 scoped_ptr<TimingFunction> timing_function = | 443 scoped_ptr<TimingFunction> timing_function = |
443 CubicBezierTimingFunction::Create(.8, 0, .3, .9).PassAs<TimingFunction>(); | 444 CubicBezierTimingFunction::Create(.8, 0, .3, .9).PassAs<TimingFunction>(); |
(...skipping 2535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2979 swap_promise_monitor_.erase(monitor); | 2980 swap_promise_monitor_.erase(monitor); |
2980 } | 2981 } |
2981 | 2982 |
2982 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { | 2983 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { |
2983 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); | 2984 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); |
2984 for (; it != swap_promise_monitor_.end(); it++) | 2985 for (; it != swap_promise_monitor_.end(); it++) |
2985 (*it)->OnSetNeedsRedrawOnImpl(); | 2986 (*it)->OnSetNeedsRedrawOnImpl(); |
2986 } | 2987 } |
2987 | 2988 |
2988 } // namespace cc | 2989 } // namespace cc |
OLD | NEW |