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

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

Issue 1152153003: [WIP] cc: Plumb frame timing info without using a commit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 void DidCompleteSwapBuffers() override { 443 void DidCompleteSwapBuffers() override {
444 test_hooks_->DidCompleteSwapBuffers(); 444 test_hooks_->DidCompleteSwapBuffers();
445 } 445 }
446 446
447 void DidPostSwapBuffers() override {} 447 void DidPostSwapBuffers() override {}
448 void DidAbortSwapBuffers() override {} 448 void DidAbortSwapBuffers() override {}
449 void ScheduleComposite() override { test_hooks_->ScheduleComposite(); } 449 void ScheduleComposite() override { test_hooks_->ScheduleComposite(); }
450 void DidCompletePageScaleAnimation() override {} 450 void DidCompletePageScaleAnimation() override {}
451 void BeginMainFrameNotExpectedSoon() override {} 451 void BeginMainFrameNotExpectedSoon() override {}
452 452
453 void RecordFrameTimingEvents(
454 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events,
455 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events)
456 override {}
457
453 private: 458 private:
454 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks) 459 explicit LayerTreeHostClientForTesting(TestHooks* test_hooks)
455 : test_hooks_(test_hooks) {} 460 : test_hooks_(test_hooks) {}
456 461
457 TestHooks* test_hooks_; 462 TestHooks* test_hooks_;
458 }; 463 };
459 464
460 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting. 465 // Adapts LayerTreeHost for test. Injects LayerTreeHostImplForTesting.
461 class LayerTreeHostForTesting : public LayerTreeHost { 466 class LayerTreeHostForTesting : public LayerTreeHost {
462 public: 467 public:
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 LayerTreeHost* LayerTreeTest::layer_tree_host() { 896 LayerTreeHost* LayerTreeTest::layer_tree_host() {
892 // We check for a null proxy here as we sometimes ask for the layer tree host 897 // We check for a null proxy here as we sometimes ask for the layer tree host
893 // when the proxy does not exist, often for checking settings after a test has 898 // when the proxy does not exist, often for checking settings after a test has
894 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See 899 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See
895 // elsewhere in this file for other examples. 900 // elsewhere in this file for other examples.
896 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); 901 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked());
897 return layer_tree_host_.get(); 902 return layer_tree_host_.get();
898 } 903 }
899 904
900 } // namespace cc 905 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698