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

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

Issue 145313006: [#7] Pass gfx structs by const ref (gfx::Size) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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_common.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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
631 return; 631 return;
632 632
633 debug_state_ = new_debug_state; 633 debug_state_ = new_debug_state;
634 634
635 rendering_stats_instrumentation_->set_record_rendering_stats( 635 rendering_stats_instrumentation_->set_record_rendering_stats(
636 debug_state_.RecordRenderingStats()); 636 debug_state_.RecordRenderingStats());
637 637
638 SetNeedsCommit(); 638 SetNeedsCommit();
639 } 639 }
640 640
641 void LayerTreeHost::SetViewportSize(gfx::Size device_viewport_size) { 641 void LayerTreeHost::SetViewportSize(const gfx::Size& device_viewport_size) {
642 if (device_viewport_size == device_viewport_size_) 642 if (device_viewport_size == device_viewport_size_)
643 return; 643 return;
644 644
645 device_viewport_size_ = device_viewport_size; 645 device_viewport_size_ = device_viewport_size;
646 646
647 SetNeedsCommit(); 647 SetNeedsCommit();
648 } 648 }
649 649
650 void LayerTreeHost::SetOverdrawBottomHeight(float overdraw_bottom_height) { 650 void LayerTreeHost::SetOverdrawBottomHeight(float overdraw_bottom_height) {
651 if (overdraw_bottom_height_ == overdraw_bottom_height) 651 if (overdraw_bottom_height_ == overdraw_bottom_height)
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 swap_promise_list_.push_back(swap_promise.Pass()); 1272 swap_promise_list_.push_back(swap_promise.Pass());
1273 } 1273 }
1274 1274
1275 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) { 1275 void LayerTreeHost::BreakSwapPromises(SwapPromise::DidNotSwapReason reason) {
1276 for (size_t i = 0; i < swap_promise_list_.size(); i++) 1276 for (size_t i = 0; i < swap_promise_list_.size(); i++)
1277 swap_promise_list_[i]->DidNotSwap(reason); 1277 swap_promise_list_[i]->DidNotSwap(reason);
1278 swap_promise_list_.clear(); 1278 swap_promise_list_.clear();
1279 } 1279 }
1280 1280
1281 } // namespace cc 1281 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_common.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698