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

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

Issue 132163009: [#6]Pass gfx structs by const ref (gfx::Vector2d) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on TOT Created 6 years, 10 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
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« 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