OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <queue> | 9 #include <queue> |
10 #include <vector> | 10 #include <vector> |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // This class is not thread safe and thus all the methods of this class | 79 // This class is not thread safe and thus all the methods of this class |
80 // (except for ctor/dtor) ensure they're being run on a single thread. | 80 // (except for ctor/dtor) ensure they're being run on a single thread. |
81 class RenderingHelper { | 81 class RenderingHelper { |
82 public: | 82 public: |
83 | 83 |
84 RenderingHelper(); | 84 RenderingHelper(); |
85 ~RenderingHelper(); | 85 ~RenderingHelper(); |
86 | 86 |
87 static bool InitializeOneOff(); | 87 static bool InitializeOneOff(); |
88 | 88 |
| 89 // Setup the platform window to display test results. This method |
| 90 // must be called on the main thread. |
| 91 void Setup(); |
| 92 |
| 93 // Tear down the platform window. This method must be called on the |
| 94 // main thread. |
| 95 void TearDown(); |
| 96 |
89 // Create the render context and windows by the specified dimensions. | 97 // Create the render context and windows by the specified dimensions. |
90 void Initialize(const RenderingHelperParams& params, | 98 void Initialize(const RenderingHelperParams& params, |
91 base::WaitableEvent* done); | 99 base::WaitableEvent* done); |
92 | 100 |
93 // Undo the effects of Initialize() and signal |*done|. | 101 // Undo the effects of Initialize() and signal |*done|. |
94 void UnInitialize(base::WaitableEvent* done); | 102 void UnInitialize(base::WaitableEvent* done); |
95 | 103 |
96 // Return a newly-created GLES2 texture id of the specified size, and | 104 // Return a newly-created GLES2 texture id of the specified size, and |
97 // signal |*done|. | 105 // signal |*done|. |
98 void CreateTexture(uint32 texture_target, | 106 void CreateTexture(uint32 texture_target, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 base::CancelableClosure render_task_; | 211 base::CancelableClosure render_task_; |
204 base::TimeTicks vsync_timebase_; | 212 base::TimeTicks vsync_timebase_; |
205 base::TimeDelta vsync_interval_; | 213 base::TimeDelta vsync_interval_; |
206 | 214 |
207 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); | 215 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
208 }; | 216 }; |
209 | 217 |
210 } // namespace content | 218 } // namespace content |
211 | 219 |
212 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ | 220 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ |
OLD | NEW |