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

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: 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/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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 test_hooks_->DidBeginMainFrame(); 217 test_hooks_->DidBeginMainFrame();
218 } 218 }
219 219
220 virtual void Animate(double monotonic_time) OVERRIDE { 220 virtual void Animate(double monotonic_time) OVERRIDE {
221 test_hooks_->Animate(base::TimeTicks::FromInternalValue( 221 test_hooks_->Animate(base::TimeTicks::FromInternalValue(
222 monotonic_time * base::Time::kMicrosecondsPerSecond)); 222 monotonic_time * base::Time::kMicrosecondsPerSecond));
223 } 223 }
224 224
225 virtual void Layout() OVERRIDE { test_hooks_->Layout(); } 225 virtual void Layout() OVERRIDE { test_hooks_->Layout(); }
226 226
227 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, 227 virtual void ApplyScrollAndScale(const gfx::Vector2d& scroll_delta,
228 float scale) OVERRIDE { 228 float scale) OVERRIDE {
229 test_hooks_->ApplyScrollAndScale(scroll_delta, scale); 229 test_hooks_->ApplyScrollAndScale(scroll_delta, scale);
230 } 230 }
231 231
232 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) 232 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback)
233 OVERRIDE { 233 OVERRIDE {
234 return test_hooks_->CreateOutputSurface(fallback); 234 return test_hooks_->CreateOutputSurface(fallback);
235 } 235 }
236 236
237 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { 237 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 compositor_contexts_ = TestContextProvider::Create(); 694 compositor_contexts_ = TestContextProvider::Create();
695 return compositor_contexts_; 695 return compositor_contexts_;
696 } 696 }
697 697
698 TestWebGraphicsContext3D* LayerTreeTest::TestContext() { 698 TestWebGraphicsContext3D* LayerTreeTest::TestContext() {
699 return static_cast<TestContextProvider*>( 699 return static_cast<TestContextProvider*>(
700 output_surface_->context_provider().get())->TestContext3d(); 700 output_surface_->context_provider().get())->TestContext3d();
701 } 701 }
702 702
703 } // namespace cc 703 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698