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

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

Issue 903273002: Update from https://crrev.com/315085 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // Implementation of LayerTreeHost callback interface. 374 // Implementation of LayerTreeHost callback interface.
375 class LayerTreeHostClientForTesting : public LayerTreeHostClient, 375 class LayerTreeHostClientForTesting : public LayerTreeHostClient,
376 public LayerTreeHostSingleThreadClient { 376 public LayerTreeHostSingleThreadClient {
377 public: 377 public:
378 static scoped_ptr<LayerTreeHostClientForTesting> Create( 378 static scoped_ptr<LayerTreeHostClientForTesting> Create(
379 TestHooks* test_hooks) { 379 TestHooks* test_hooks) {
380 return make_scoped_ptr(new LayerTreeHostClientForTesting(test_hooks)); 380 return make_scoped_ptr(new LayerTreeHostClientForTesting(test_hooks));
381 } 381 }
382 ~LayerTreeHostClientForTesting() override {} 382 ~LayerTreeHostClientForTesting() override {}
383 383
384 void WillBeginMainFrame(int frame_id) override { 384 void WillBeginMainFrame() override { test_hooks_->WillBeginMainFrame(); }
385 test_hooks_->WillBeginMainFrame();
386 }
387 385
388 void DidBeginMainFrame() override { test_hooks_->DidBeginMainFrame(); } 386 void DidBeginMainFrame() override { test_hooks_->DidBeginMainFrame(); }
389 387
390 void BeginMainFrame(const BeginFrameArgs& args) override { 388 void BeginMainFrame(const BeginFrameArgs& args) override {
391 test_hooks_->BeginMainFrame(args); 389 test_hooks_->BeginMainFrame(args);
392 } 390 }
393 391
394 void Layout() override { test_hooks_->Layout(); } 392 void Layout() override { test_hooks_->Layout(); }
395 393
396 void ApplyViewportDeltas(const gfx::Vector2d& inner_delta, 394 void ApplyViewportDeltas(const gfx::Vector2dF& inner_delta,
397 const gfx::Vector2d& outer_delta, 395 const gfx::Vector2dF& outer_delta,
398 const gfx::Vector2dF& elastic_overscroll_delta, 396 const gfx::Vector2dF& elastic_overscroll_delta,
399 float page_scale, 397 float page_scale,
400 float top_controls_delta) override { 398 float top_controls_delta) override {
401 test_hooks_->ApplyViewportDeltas(inner_delta, outer_delta, 399 test_hooks_->ApplyViewportDeltas(inner_delta, outer_delta,
402 elastic_overscroll_delta, page_scale, 400 elastic_overscroll_delta, page_scale,
403 top_controls_delta); 401 top_controls_delta);
404 } 402 }
405 void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta, 403 void ApplyViewportDeltas(const gfx::Vector2d& scroll_delta,
406 float scale, 404 float scale,
407 float top_controls_delta) override { 405 float top_controls_delta) override {
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 return -1; 872 return -1;
875 } 873 }
876 874
877 void LayerTreeTest::DestroyLayerTreeHost() { 875 void LayerTreeTest::DestroyLayerTreeHost() {
878 if (layer_tree_host_ && layer_tree_host_->root_layer()) 876 if (layer_tree_host_ && layer_tree_host_->root_layer())
879 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); 877 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
880 layer_tree_host_ = nullptr; 878 layer_tree_host_ = nullptr;
881 } 879 }
882 880
883 } // namespace cc 881 } // 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