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

Side by Side Diff: cc/layers/layer.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/layers/layer.h ('k') | cc/layers/layer_impl.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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 scroll_offset = layer_tree_host()->DistributeScrollOffsetToViewports( 686 scroll_offset = layer_tree_host()->DistributeScrollOffsetToViewports(
687 scroll_offset, this); 687 scroll_offset, this);
688 } 688 }
689 689
690 if (scroll_offset_ == scroll_offset) 690 if (scroll_offset_ == scroll_offset)
691 return; 691 return;
692 scroll_offset_ = scroll_offset; 692 scroll_offset_ = scroll_offset;
693 SetNeedsCommit(); 693 SetNeedsCommit();
694 } 694 }
695 695
696 void Layer::SetScrollOffsetFromImplSide(gfx::Vector2d scroll_offset) { 696 void Layer::SetScrollOffsetFromImplSide(const gfx::Vector2d& scroll_offset) {
697 DCHECK(IsPropertyChangeAllowed()); 697 DCHECK(IsPropertyChangeAllowed());
698 // This function only gets called during a BeginMainFrame, so there 698 // This function only gets called during a BeginMainFrame, so there
699 // is no need to call SetNeedsUpdate here. 699 // is no need to call SetNeedsUpdate here.
700 DCHECK(layer_tree_host_ && layer_tree_host_->CommitRequested()); 700 DCHECK(layer_tree_host_ && layer_tree_host_->CommitRequested());
701 if (scroll_offset_ == scroll_offset) 701 if (scroll_offset_ == scroll_offset)
702 return; 702 return;
703 scroll_offset_ = scroll_offset; 703 scroll_offset_ = scroll_offset;
704 SetNeedsPushProperties(); 704 SetNeedsPushProperties();
705 if (!did_scroll_callback_.is_null()) 705 if (!did_scroll_callback_.is_null())
706 did_scroll_callback_.Run(); 706 did_scroll_callback_.Run();
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1197 1197
1198 if (clip_parent_) 1198 if (clip_parent_)
1199 clip_parent_->RemoveClipChild(this); 1199 clip_parent_->RemoveClipChild(this);
1200 1200
1201 clip_parent_ = NULL; 1201 clip_parent_ = NULL;
1202 } 1202 }
1203 1203
1204 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { 1204 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) {
1205 benchmark->RunOnLayer(this); 1205 benchmark->RunOnLayer(this);
1206 } 1206 }
1207
1208 } // namespace cc 1207 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698