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

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

Issue 1143433005: Remove gfx::FrameTime for a single clock source (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Handling patch for mac files 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 16 matching lines...) Expand all
27 #include "cc/test/test_shared_bitmap_manager.h" 27 #include "cc/test/test_shared_bitmap_manager.h"
28 #include "cc/test/test_task_graph_runner.h" 28 #include "cc/test/test_task_graph_runner.h"
29 #include "cc/test/tiled_layer_test_common.h" 29 #include "cc/test/tiled_layer_test_common.h"
30 #include "cc/trees/layer_tree_host_client.h" 30 #include "cc/trees/layer_tree_host_client.h"
31 #include "cc/trees/layer_tree_host_impl.h" 31 #include "cc/trees/layer_tree_host_impl.h"
32 #include "cc/trees/layer_tree_host_single_thread_client.h" 32 #include "cc/trees/layer_tree_host_single_thread_client.h"
33 #include "cc/trees/layer_tree_impl.h" 33 #include "cc/trees/layer_tree_impl.h"
34 #include "cc/trees/single_thread_proxy.h" 34 #include "cc/trees/single_thread_proxy.h"
35 #include "cc/trees/thread_proxy.h" 35 #include "cc/trees/thread_proxy.h"
36 #include "testing/gmock/include/gmock/gmock.h" 36 #include "testing/gmock/include/gmock/gmock.h"
37 #include "ui/gfx/frame_time.h"
38 #include "ui/gfx/geometry/size_conversions.h" 37 #include "ui/gfx/geometry/size_conversions.h"
39 38
40 namespace cc { 39 namespace cc {
41 40
42 TestHooks::TestHooks() {} 41 TestHooks::TestHooks() {}
43 42
44 TestHooks::~TestHooks() {} 43 TestHooks::~TestHooks() {}
45 44
46 DrawResult TestHooks::PrepareToDrawOnThread( 45 DrawResult TestHooks::PrepareToDrawOnThread(
47 LayerTreeHostImpl* host_impl, 46 LayerTreeHostImpl* host_impl,
(...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 void LayerTreeTest::DispatchSetNextCommitForcesRedraw() { 778 void LayerTreeTest::DispatchSetNextCommitForcesRedraw() {
780 DCHECK(!proxy() || proxy()->IsMainThread()); 779 DCHECK(!proxy() || proxy()->IsMainThread());
781 780
782 if (layer_tree_host_) 781 if (layer_tree_host_)
783 layer_tree_host_->SetNextCommitForcesRedraw(); 782 layer_tree_host_->SetNextCommitForcesRedraw();
784 } 783 }
785 784
786 void LayerTreeTest::DispatchCompositeImmediately() { 785 void LayerTreeTest::DispatchCompositeImmediately() {
787 DCHECK(!proxy() || proxy()->IsMainThread()); 786 DCHECK(!proxy() || proxy()->IsMainThread());
788 if (layer_tree_host_) 787 if (layer_tree_host_)
789 layer_tree_host_->Composite(gfx::FrameTime::Now()); 788 layer_tree_host_->Composite(base::TimeTicks::Now());
790 } 789 }
791 790
792 void LayerTreeTest::RunTest(bool threaded, 791 void LayerTreeTest::RunTest(bool threaded,
793 bool delegating_renderer, 792 bool delegating_renderer,
794 bool impl_side_painting) { 793 bool impl_side_painting) {
795 if (threaded) { 794 if (threaded) {
796 impl_thread_.reset(new base::Thread("Compositor")); 795 impl_thread_.reset(new base::Thread("Compositor"));
797 ASSERT_TRUE(impl_thread_->Start()); 796 ASSERT_TRUE(impl_thread_->Start());
798 } 797 }
799 798
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 LayerTreeHost* LayerTreeTest::layer_tree_host() { 890 LayerTreeHost* LayerTreeTest::layer_tree_host() {
892 // We check for a null proxy here as we sometimes ask for the layer tree host 891 // 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 892 // when the proxy does not exist, often for checking settings after a test has
894 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See 893 // completed. For example, LTHPixelResourceTest::RunPixelResourceTest. See
895 // elsewhere in this file for other examples. 894 // elsewhere in this file for other examples.
896 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked()); 895 DCHECK(!proxy() || proxy()->IsMainThread() || proxy()->IsMainThreadBlocked());
897 return layer_tree_host_.get(); 896 return layer_tree_host_.get();
898 } 897 }
899 898
900 } // namespace cc 899 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698