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

Side by Side Diff: cc/test/layer_tree_test.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/test/layer_tree_test.h ('k') | cc/test/pixel_test.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/test/layer_tree_test.h" 5 #include "cc/test/layer_tree_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/animation/animation.h" 8 #include "cc/animation/animation.h"
9 #include "cc/animation/animation_registrar.h" 9 #include "cc/animation/animation_registrar.h"
10 #include "cc/animation/layer_animation_controller.h" 10 #include "cc/animation/layer_animation_controller.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 test_hooks_->DidBeginMainFrame(); 219 test_hooks_->DidBeginMainFrame();
220 } 220 }
221 221
222 virtual void Animate(double monotonic_time) OVERRIDE { 222 virtual void Animate(double monotonic_time) OVERRIDE {
223 test_hooks_->Animate(base::TimeTicks::FromInternalValue( 223 test_hooks_->Animate(base::TimeTicks::FromInternalValue(
224 monotonic_time * base::Time::kMicrosecondsPerSecond)); 224 monotonic_time * base::Time::kMicrosecondsPerSecond));
225 } 225 }
226 226
227 virtual void Layout() OVERRIDE { test_hooks_->Layout(); } 227 virtual void Layout() OVERRIDE { test_hooks_->Layout(); }
228 228
229 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, 229 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta,
230 float scale) OVERRIDE { 230 float scale) OVERRIDE {
231 test_hooks_->ApplyScrollAndScale(scroll_delta, scale); 231 test_hooks_->ApplyScrollAndScale(scroll_delta, scale);
232 } 232 }
233 233
234 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) 234 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback)
235 OVERRIDE { 235 OVERRIDE {
236 return test_hooks_->CreateOutputSurface(fallback); 236 return test_hooks_->CreateOutputSurface(fallback);
237 } 237 }
238 238
239 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { 239 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 const { 706 const {
707 if (impl->pending_tree()) 707 if (impl->pending_tree())
708 return impl->pending_tree()->source_frame_number(); 708 return impl->pending_tree()->source_frame_number();
709 if (impl->active_tree()) 709 if (impl->active_tree())
710 return impl->active_tree()->source_frame_number(); 710 return impl->active_tree()->source_frame_number();
711 // Source frames start at 0, so this is invalid. 711 // Source frames start at 0, so this is invalid.
712 return -1; 712 return -1;
713 } 713 }
714 714
715 } // namespace cc 715 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/layer_tree_test.h ('k') | cc/test/pixel_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698