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

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: Created 6 years, 11 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 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 &memory_nice_to_have_bytes, 421 &memory_nice_to_have_bytes,
422 &memory_allocated_bytes, 422 &memory_allocated_bytes,
423 &memory_used_bytes); 423 &memory_used_bytes);
424 SendManagedMemoryStats(memory_required_bytes, 424 SendManagedMemoryStats(memory_required_bytes,
425 memory_nice_to_have_bytes, 425 memory_nice_to_have_bytes,
426 memory_used_bytes); 426 memory_used_bytes);
427 427
428 client_->DidManageTiles(); 428 client_->DidManageTiles();
429 } 429 }
430 430
431 void LayerTreeHostImpl::StartPageScaleAnimation(gfx::Vector2d target_offset, 431 void LayerTreeHostImpl::StartPageScaleAnimation(
432 bool anchor_point, 432 const gfx::Vector2d& target_offset,
433 float page_scale, 433 bool anchor_point,
434 base::TimeDelta duration) { 434 float page_scale,
435 base::TimeDelta duration) {
435 if (!RootScrollLayer()) 436 if (!RootScrollLayer())
436 return; 437 return;
437 438
438 gfx::Vector2dF scroll_total = 439 gfx::Vector2dF scroll_total =
439 RootScrollLayer()->scroll_offset() + RootScrollLayer()->ScrollDelta(); 440 RootScrollLayer()->scroll_offset() + RootScrollLayer()->ScrollDelta();
440 gfx::SizeF scaled_scrollable_size = active_tree_->ScrollableSize(); 441 gfx::SizeF scaled_scrollable_size = active_tree_->ScrollableSize();
441 gfx::SizeF viewport_size = UnscaledScrollableViewportSize(); 442 gfx::SizeF viewport_size = UnscaledScrollableViewportSize();
442 443
443 // Easing constants experimentally determined. 444 // Easing constants experimentally determined.
444 scoped_ptr<TimingFunction> timing_function = 445 scoped_ptr<TimingFunction> timing_function =
(...skipping 2477 matching lines...) Expand 10 before | Expand all | Expand 10 after
2922 swap_promise_monitor_.erase(monitor); 2923 swap_promise_monitor_.erase(monitor);
2923 } 2924 }
2924 2925
2925 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 2926 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
2926 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 2927 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
2927 for (; it != swap_promise_monitor_.end(); it++) 2928 for (; it != swap_promise_monitor_.end(); it++)
2928 (*it)->OnSetNeedsRedrawOnImpl(); 2929 (*it)->OnSetNeedsRedrawOnImpl();
2929 } 2930 }
2930 2931
2931 } // namespace cc 2932 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698