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

Side by Side Diff: content/common/gpu/media/rendering_helper.h

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove picture destruction sequence 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
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 // Flushes the pending frames. Notify the rendering_helper there won't be 108 // Flushes the pending frames. Notify the rendering_helper there won't be
109 // more video frames. 109 // more video frames.
110 void Flush(size_t window_id); 110 void Flush(size_t window_id);
111 111
112 // Delete |texture_id|. 112 // Delete |texture_id|.
113 void DeleteTexture(uint32 texture_id); 113 void DeleteTexture(uint32 texture_id);
114 114
115 // Get the platform specific handle to the OpenGL display. 115 // Get the platform specific handle to the OpenGL display.
116 void* GetGLDisplay(); 116 void* GetGLDisplay();
117 117
118 // Get the GL context.
119 scoped_refptr<gfx::GLContext> GetGLContext();
120
118 // Get the platform specific handle to the OpenGL context. 121 // Get the platform specific handle to the OpenGL context.
119 void* GetGLContext(); 122 void* GetGLContextHandle();
120 123
121 // Get rendered thumbnails as RGB. 124 // Get rendered thumbnails as RGB.
122 // Sets alpha_solid to true if the alpha channel is entirely 0xff. 125 // Sets alpha_solid to true if the alpha channel is entirely 0xff.
123 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb, 126 void GetThumbnailsAsRGB(std::vector<unsigned char>* rgb,
124 bool* alpha_solid, 127 bool* alpha_solid,
125 base::WaitableEvent* done); 128 base::WaitableEvent* done);
126 129
127 private: 130 private:
128 struct RenderedVideo { 131 struct RenderedVideo {
129 // The rect on the screen where the video will be rendered. 132 // The rect on the screen where the video will be rendered.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 166
164 // Render |texture_id| to the current view port of the screen using target 167 // Render |texture_id| to the current view port of the screen using target
165 // |texture_target|. 168 // |texture_target|.
166 void RenderTexture(uint32 texture_target, uint32 texture_id); 169 void RenderTexture(uint32 texture_target, uint32 texture_id);
167 170
168 base::MessageLoop* message_loop_; 171 base::MessageLoop* message_loop_;
169 172
170 scoped_refptr<gfx::GLContext> gl_context_; 173 scoped_refptr<gfx::GLContext> gl_context_;
171 scoped_refptr<gfx::GLSurface> gl_surface_; 174 scoped_refptr<gfx::GLSurface> gl_surface_;
172 175
176 #if defined(USE_OZONE)
177 class StubOzoneDelegate;
178 scoped_ptr<StubOzoneDelegate> platform_window_delegate_;
179 #endif
180
173 gfx::AcceleratedWidget window_; 181 gfx::AcceleratedWidget window_;
174 182
175 gfx::Size screen_size_; 183 gfx::Size screen_size_;
176 184
177 std::vector<RenderedVideo> videos_; 185 std::vector<RenderedVideo> videos_;
178 186
179 bool render_as_thumbnails_; 187 bool render_as_thumbnails_;
180 int frame_count_; 188 int frame_count_;
181 GLuint thumbnails_fbo_id_; 189 GLuint thumbnails_fbo_id_;
182 GLuint thumbnails_texture_id_; 190 GLuint thumbnails_texture_id_;
183 gfx::Size thumbnails_fbo_size_; 191 gfx::Size thumbnails_fbo_size_;
184 gfx::Size thumbnail_size_; 192 gfx::Size thumbnail_size_;
185 GLuint program_; 193 GLuint program_;
186 base::TimeDelta frame_duration_; 194 base::TimeDelta frame_duration_;
187 base::TimeTicks scheduled_render_time_; 195 base::TimeTicks scheduled_render_time_;
188 base::CancelableClosure render_task_; 196 base::CancelableClosure render_task_;
189 base::TimeTicks vsync_timebase_; 197 base::TimeTicks vsync_timebase_;
190 base::TimeDelta vsync_interval_; 198 base::TimeDelta vsync_interval_;
191 199
192 DISALLOW_COPY_AND_ASSIGN(RenderingHelper); 200 DISALLOW_COPY_AND_ASSIGN(RenderingHelper);
193 }; 201 };
194 202
195 } // namespace content 203 } // namespace content
196 204
197 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_ 205 #endif // CONTENT_COMMON_GPU_MEDIA_RENDERING_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698