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

Side by Side Diff: cc/test/layer_tree_test.cc

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: fix some tests; needs rebase; Created 7 years, 5 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 // Implementation of LayerTreeHost callback interface. 223 // Implementation of LayerTreeHost callback interface.
224 class LayerTreeHostClientForTesting : public LayerTreeHostClient { 224 class LayerTreeHostClientForTesting : public LayerTreeHostClient {
225 public: 225 public:
226 static scoped_ptr<LayerTreeHostClientForTesting> Create( 226 static scoped_ptr<LayerTreeHostClientForTesting> Create(
227 TestHooks* test_hooks) { 227 TestHooks* test_hooks) {
228 return make_scoped_ptr(new LayerTreeHostClientForTesting(test_hooks)); 228 return make_scoped_ptr(new LayerTreeHostClientForTesting(test_hooks));
229 } 229 }
230 virtual ~LayerTreeHostClientForTesting() {} 230 virtual ~LayerTreeHostClientForTesting() {}
231 231
232 virtual void WillBeginFrame() OVERRIDE {} 232 virtual void WillBeginFrame() OVERRIDE { }
233 233
234 virtual void DidBeginFrame() OVERRIDE {} 234 virtual void DidBeginFrame() OVERRIDE { }
235 235
236 virtual void Animate(double monotonic_time) OVERRIDE { 236 virtual void Animate(double monotonic_time) OVERRIDE {
237 test_hooks_->Animate(base::TimeTicks::FromInternalValue( 237 test_hooks_->Animate(base::TimeTicks::FromInternalValue(
238 monotonic_time * base::Time::kMicrosecondsPerSecond)); 238 monotonic_time * base::Time::kMicrosecondsPerSecond));
239 } 239 }
240 240
241 virtual void Layout() OVERRIDE { 241 virtual void Layout() OVERRIDE {
242 test_hooks_->Layout(); 242 test_hooks_->Layout();
243 } 243 }
244 244
245 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta, 245 virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta,
246 float scale) OVERRIDE { 246 float scale) OVERRIDE {
247 test_hooks_->ApplyScrollAndScale(scroll_delta, scale); 247 test_hooks_->ApplyScrollAndScale(scroll_delta, scale);
248 } 248 }
249 249
250 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE { 250 virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE {
251 return test_hooks_->CreateOutputSurface(); 251 return test_hooks_->CreateOutputSurface();
252 } 252 }
253 253
254 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE { 254 virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
255 test_hooks_->DidInitializeOutputSurface(succeeded); 255 test_hooks_->DidInitializeOutputSurface(succeeded);
256 } 256 }
257 257
258 virtual void DidFailToInitializeOutputSurface() OVERRIDE { 258 virtual void DidFailToInitializeOutputSurface() OVERRIDE {
259 test_hooks_->DidFailToInitializeOutputSurface(); 259 test_hooks_->DidFailToInitializeOutputSurface();
260 } 260 }
261 261
262 virtual void WillCommit() OVERRIDE {} 262 virtual void WillCommit() OVERRIDE { }
263 263
264 virtual void DidCommit() OVERRIDE { 264 virtual void DidCommit() OVERRIDE {
265 test_hooks_->DidCommit(); 265 test_hooks_->DidCommit();
266 } 266 }
267 267
268 virtual void DidCommitAndDrawFrame() OVERRIDE { 268 virtual void DidCommitAndDrawFrame() OVERRIDE {
269 test_hooks_->DidCommitAndDrawFrame(); 269 test_hooks_->DidCommitAndDrawFrame();
270 } 270 }
271 271
272 virtual void DidCompleteSwapBuffers() OVERRIDE { 272 virtual void DidCompleteSwapBuffers() OVERRIDE {
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 621
622 scoped_refptr<cc::ContextProvider> LayerTreeTest:: 622 scoped_refptr<cc::ContextProvider> LayerTreeTest::
623 OffscreenContextProviderForCompositorThread() { 623 OffscreenContextProviderForCompositorThread() {
624 if (!compositor_thread_contexts_.get() || 624 if (!compositor_thread_contexts_.get() ||
625 compositor_thread_contexts_->DestroyedOnMainThread()) 625 compositor_thread_contexts_->DestroyedOnMainThread())
626 compositor_thread_contexts_ = FakeContextProvider::Create(); 626 compositor_thread_contexts_ = FakeContextProvider::Create();
627 return compositor_thread_contexts_; 627 return compositor_thread_contexts_;
628 } 628 }
629 629
630 } // namespace cc 630 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698