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

Side by Side Diff: cc/trees/layer_tree_host.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.h ('k') | cc/trees/layer_tree_host_client.h » ('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.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <stack> 8 #include <stack>
9 #include <string> 9 #include <string>
10 10
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 686
687 void LayerTreeHost::SetVisible(bool visible) { 687 void LayerTreeHost::SetVisible(bool visible) {
688 if (visible_ == visible) 688 if (visible_ == visible)
689 return; 689 return;
690 visible_ = visible; 690 visible_ = visible;
691 if (!visible) 691 if (!visible)
692 ReduceMemoryUsage(); 692 ReduceMemoryUsage();
693 proxy_->SetVisible(visible); 693 proxy_->SetVisible(visible);
694 } 694 }
695 695
696 void LayerTreeHost::StartPageScaleAnimation(gfx::Vector2d target_offset, 696 void LayerTreeHost::StartPageScaleAnimation(const gfx::Vector2d& target_offset,
697 bool use_anchor, 697 bool use_anchor,
698 float scale, 698 float scale,
699 base::TimeDelta duration) { 699 base::TimeDelta duration) {
700 pending_page_scale_animation_.reset(new PendingPageScaleAnimation); 700 pending_page_scale_animation_.reset(new PendingPageScaleAnimation);
701 pending_page_scale_animation_->target_offset = target_offset; 701 pending_page_scale_animation_->target_offset = target_offset;
702 pending_page_scale_animation_->use_anchor = use_anchor; 702 pending_page_scale_animation_->use_anchor = use_anchor;
703 pending_page_scale_animation_->scale = scale; 703 pending_page_scale_animation_->scale = scale;
704 pending_page_scale_animation_->duration = duration; 704 pending_page_scale_animation_->duration = duration;
705 705
706 SetNeedsCommit(); 706 SetNeedsCommit();
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 swap_promise_list_.push_back(swap_promise.Pass()); 1322 swap_promise_list_.push_back(swap_promise.Pass());
1323 } 1323 }
1324 1324
1325 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1325 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1326 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1326 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1327 swap_promise_list_[i]->DidNotSwap(reason); 1327 swap_promise_list_[i]->DidNotSwap(reason);
1328 swap_promise_list_.clear(); 1328 swap_promise_list_.clear();
1329 } 1329 }
1330 1330
1331 } // namespace cc 1331 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698