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

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

Issue 735723005: cc: Adding creation location to debug BeginFrameArgs objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto master. Created 6 years 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/fake_layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 DCHECK(CalledOnValidThread()); 84 DCHECK(CalledOnValidThread());
85 is_ready_ = true; 85 is_ready_ = true;
86 } 86 }
87 87
88 bool is_ready() const { 88 bool is_ready() const {
89 return is_ready_; 89 return is_ready_;
90 } 90 }
91 91
92 void TestOnBeginFrame() { 92 void TestOnBeginFrame() {
93 DCHECK(CalledOnValidThread()); 93 DCHECK(CalledOnValidThread());
94 CallOnBeginFrame(CreateBeginFrameArgsForTesting()); 94 CallOnBeginFrame(CreateBeginFrameArgsForTesting(BEGINFRAME_FROM_HERE));
95 } 95 }
96 96
97 private: 97 private:
98 double milliseconds_per_frame_; 98 double milliseconds_per_frame_;
99 bool is_ready_; 99 bool is_ready_;
100 base::WeakPtrFactory<ExternalBeginFrameSourceForTest> weak_ptr_factory_; 100 base::WeakPtrFactory<ExternalBeginFrameSourceForTest> weak_ptr_factory_;
101 }; 101 };
102 102
103 // Adapts ThreadProxy for test. Injects test hooks for testing. 103 // Adapts ThreadProxy for test. Injects test hooks for testing.
104 class ThreadProxyForTest : public ThreadProxy { 104 class ThreadProxyForTest : public ThreadProxy {
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 return -1; 824 return -1;
825 } 825 }
826 826
827 void LayerTreeTest::DestroyLayerTreeHost() { 827 void LayerTreeTest::DestroyLayerTreeHost() {
828 if (layer_tree_host_ && layer_tree_host_->root_layer()) 828 if (layer_tree_host_ && layer_tree_host_->root_layer())
829 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL); 829 layer_tree_host_->root_layer()->SetLayerTreeHost(NULL);
830 layer_tree_host_ = nullptr; 830 layer_tree_host_ = nullptr;
831 } 831 }
832 832
833 } // namespace cc 833 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/fake_layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698