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

Side by Side Diff: cc/test/layer_tree_test_common.h

Issue 12804006: cc: Save correct frame begin time to FrameRateCounter (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase to 188402 Created 7 years, 9 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/single_thread_proxy.cc ('k') | cc/test/layer_tree_test_common.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 #ifndef CC_TEST_LAYER_TREE_TEST_COMMON_H_ 5 #ifndef CC_TEST_LAYER_TREE_TEST_COMMON_H_
6 #define CC_TEST_LAYER_TREE_TEST_COMMON_H_ 6 #define CC_TEST_LAYER_TREE_TEST_COMMON_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "cc/layer_tree_host.h" 10 #include "cc/layer_tree_host.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 }; 160 };
161 161
162 // Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks. 162 // Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks.
163 class MockLayerTreeHostImpl : public LayerTreeHostImpl { 163 class MockLayerTreeHostImpl : public LayerTreeHostImpl {
164 public: 164 public:
165 static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const LayerTreeS ettings&, LayerTreeHostImplClient*, Proxy*); 165 static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const LayerTreeS ettings&, LayerTreeHostImplClient*, Proxy*);
166 166
167 virtual void BeginCommit() OVERRIDE; 167 virtual void BeginCommit() OVERRIDE;
168 virtual void CommitComplete() OVERRIDE; 168 virtual void CommitComplete() OVERRIDE;
169 virtual bool PrepareToDraw(FrameData* frame) OVERRIDE; 169 virtual bool PrepareToDraw(FrameData* frame) OVERRIDE;
170 virtual void DrawLayers(FrameData* frame) OVERRIDE; 170 virtual void DrawLayers(FrameData* frame, base::TimeTicks frameBeginTime) OV ERRIDE;
171 virtual bool SwapBuffers() OVERRIDE; 171 virtual bool SwapBuffers() OVERRIDE;
172 virtual bool ActivatePendingTreeIfNeeded() OVERRIDE; 172 virtual bool ActivatePendingTreeIfNeeded() OVERRIDE;
173 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> outputSurface) OVE RRIDE; 173 virtual bool InitializeRenderer(scoped_ptr<OutputSurface> outputSurface) OVE RRIDE;
174 virtual void SetVisible(bool visible) OVERRIDE; 174 virtual void SetVisible(bool visible) OVERRIDE;
175 175
176 // Make these public. 176 // Make these public.
177 typedef std::vector<LayerImpl*> LayerList; 177 typedef std::vector<LayerImpl*> LayerList;
178 178
179 protected: 179 protected:
180 virtual void AnimateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime) OVERRIDE; 180 virtual void AnimateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime) OVERRIDE;
(...skipping 18 matching lines...) Expand all
199 TEST_F(TEST_FIXTURE_NAME, runMultiThread) \ 199 TEST_F(TEST_FIXTURE_NAME, runMultiThread) \
200 { \ 200 { \
201 runTest(true); \ 201 runTest(true); \
202 } 202 }
203 203
204 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 204 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
205 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 205 SINGLE_THREAD_TEST_F(TEST_FIXTURE_NAME) \
206 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) 206 MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME)
207 207
208 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_ 208 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/single_thread_proxy.cc ('k') | cc/test/layer_tree_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698