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

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

Issue 11419269: cc: Give ownership of render passes to the renderer when drawing a frame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « cc/renderer.h ('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/hash_tables.h" 8 #include "base/hash_tables.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 }; 146 };
147 147
148 // Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks. 148 // Adapts LayerTreeHostImpl for test. Runs real code, then invokes test hooks.
149 class MockLayerTreeHostImpl : public cc::LayerTreeHostImpl { 149 class MockLayerTreeHostImpl : public cc::LayerTreeHostImpl {
150 public: 150 public:
151 static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const cc::LayerT reeSettings&, cc::LayerTreeHostImplClient*, cc::Proxy*); 151 static scoped_ptr<MockLayerTreeHostImpl> create(TestHooks*, const cc::LayerT reeSettings&, cc::LayerTreeHostImplClient*, cc::Proxy*);
152 152
153 virtual void beginCommit() OVERRIDE; 153 virtual void beginCommit() OVERRIDE;
154 virtual void commitComplete() OVERRIDE; 154 virtual void commitComplete() OVERRIDE;
155 virtual bool prepareToDraw(FrameData&) OVERRIDE; 155 virtual bool prepareToDraw(FrameData&) OVERRIDE;
156 virtual void drawLayers(const FrameData&) OVERRIDE; 156 virtual void drawLayers(FrameData&) OVERRIDE;
157 157
158 // Make these public. 158 // Make these public.
159 typedef std::vector<cc::LayerImpl*> LayerList; 159 typedef std::vector<cc::LayerImpl*> LayerList;
160 using LayerTreeHostImpl::calculateRenderSurfaceLayerList; 160 using LayerTreeHostImpl::calculateRenderSurfaceLayerList;
161 161
162 protected: 162 protected:
163 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime) OVERRIDE; 163 virtual void animateLayers(base::TimeTicks monotonicTime, base::Time wallClo ckTime) OVERRIDE;
164 virtual base::TimeDelta lowFrequencyAnimationInterval() const OVERRIDE; 164 virtual base::TimeDelta lowFrequencyAnimationInterval() const OVERRIDE;
165 165
166 private: 166 private:
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 TEST_F(TEST_FIXTURE_NAME, runSingleThread) \ 201 TEST_F(TEST_FIXTURE_NAME, runSingleThread) \
202 { \ 202 { \
203 runTest(false); \ 203 runTest(false); \
204 } \ 204 } \
205 TEST_F(TEST_FIXTURE_NAME, runMultiThread) \ 205 TEST_F(TEST_FIXTURE_NAME, runMultiThread) \
206 { \ 206 { \
207 runTest(true); \ 207 runTest(true); \
208 } 208 }
209 209
210 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_ 210 #endif // CC_TEST_LAYER_TREE_TEST_COMMON_H_
OLDNEW
« no previous file with comments | « cc/renderer.h ('k') | cc/test/layer_tree_test_common.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698