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

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

Issue 465853004: Moving RenderSurface creation outside of CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 #ifndef CC_TEST_LAYER_TREE_TEST_H_ 5 #ifndef CC_TEST_LAYER_TREE_TEST_H_
6 #define CC_TEST_LAYER_TREE_TEST_H_ 6 #define CC_TEST_LAYER_TREE_TEST_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/animation/animation_delegate.h" 10 #include "cc/animation/animation_delegate.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time, 90 virtual void NotifyAnimationStarted(base::TimeTicks monotonic_time,
91 Animation::TargetProperty target_property) 91 Animation::TargetProperty target_property)
92 OVERRIDE {} 92 OVERRIDE {}
93 virtual void NotifyAnimationFinished( 93 virtual void NotifyAnimationFinished(
94 base::TimeTicks monotonic_time, 94 base::TimeTicks monotonic_time,
95 Animation::TargetProperty target_property) OVERRIDE {} 95 Animation::TargetProperty target_property) OVERRIDE {}
96 96
97 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) = 0; 97 virtual scoped_ptr<OutputSurface> CreateOutputSurface(bool fallback) = 0;
98 }; 98 };
99 99
100 class PseudoSyncingLayerTreeHostImpl : public LayerTreeHostImpl {
101 public:
102 static scoped_ptr<LayerTreeHostImpl> Create(
103 const LayerTreeSettings& settings,
104 LayerTreeHostImplClient* client,
105 Proxy* proxy,
106 RenderingStatsInstrumentation* rendering_stats_instrumentation,
107 SharedBitmapManager* manager,
108 int id) {
109 return make_scoped_ptr(static_cast<LayerTreeHostImpl*>(
110 new PseudoSyncingLayerTreeHostImpl(settings,
111 client,
112 proxy,
113 rendering_stats_instrumentation,
114 manager,
115 id)));
116 }
117
118 virtual bool IsTesting() OVERRIDE;
119
120 protected:
121 PseudoSyncingLayerTreeHostImpl(
122 const LayerTreeSettings& settings,
123 LayerTreeHostImplClient* client,
124 Proxy* proxy,
125 RenderingStatsInstrumentation* rendering_stats_instrumentation,
126 SharedBitmapManager* manager,
127 int id)
128 : LayerTreeHostImpl(settings,
129 client,
130 proxy,
131 rendering_stats_instrumentation,
132 manager,
133 id) {}
134 };
135
100 class BeginTask; 136 class BeginTask;
101 class LayerTreeHostClientForTesting; 137 class LayerTreeHostClientForTesting;
102 class TimeoutTask; 138 class TimeoutTask;
103 139
104 // The LayerTreeTests runs with the main loop running. It instantiates a single 140 // The LayerTreeTests runs with the main loop running. It instantiates a single
105 // LayerTreeHostForTesting and associated LayerTreeHostImplForTesting and 141 // LayerTreeHostForTesting and associated LayerTreeHostImplForTesting and
106 // LayerTreeHostClientForTesting. 142 // LayerTreeHostClientForTesting.
107 // 143 //
108 // BeginTest() is called once the main message loop is running and the layer 144 // BeginTest() is called once the main message loop is running and the layer
109 // tree host is initialized. 145 // tree host is initialized.
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 326
291 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \ 327 #define SINGLE_AND_MULTI_THREAD_NOIMPL_TEST_F(TEST_FIXTURE_NAME) \
292 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \ 328 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME); \
293 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME) 329 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_NOIMPL_TEST_F(TEST_FIXTURE_NAME)
294 330
295 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \ 331 #define SINGLE_AND_MULTI_THREAD_TEST_F(TEST_FIXTURE_NAME) \
296 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \ 332 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F(TEST_FIXTURE_NAME); \
297 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME) 333 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(TEST_FIXTURE_NAME)
298 334
299 #endif // CC_TEST_LAYER_TREE_TEST_H_ 335 #endif // CC_TEST_LAYER_TREE_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698