Chromium Code Reviews| Index: content/common/gpu/media/rendering_helper.h |
| diff --git a/content/common/gpu/media/rendering_helper.h b/content/common/gpu/media/rendering_helper.h |
| index 36b4924adb13ab2dfe8a1dc453cd56ebf959268b..ca9c64848afdbc5934a101c9ba16090420a0a582 100644 |
| --- a/content/common/gpu/media/rendering_helper.h |
| +++ b/content/common/gpu/media/rendering_helper.h |
| @@ -9,7 +9,9 @@ |
| #include <vector> |
| #include "base/basictypes.h" |
| -#include "ui/gfx/size.h" |
| +#include "base/time/time.h" |
| +#include "ui/gfx/geometry/rect.h" |
| +#include "ui/gfx/geometry/size.h" |
| #include "ui/gl/gl_bindings.h" |
| namespace base { |
| @@ -27,6 +29,10 @@ typedef EGLContext NativeContextType; |
| namespace content { |
| +enum RenderingState { |
|
Ami GONE FROM CHROMIUM
2014/05/08 21:15:09
only used by the impl; should be in the private: s
Owen Lin
2014/05/09 10:25:03
Done.
|
| + RENDERING_START, RENDERING_STOPPING, RENDERING_STOPPED |
| +}; |
| + |
| struct RenderingHelperParams { |
| RenderingHelperParams(); |
| ~RenderingHelperParams(); |
| @@ -89,13 +95,20 @@ class RenderingHelper { |
| private: |
| void Clear(); |
| + void StartRendering(); |
| + void StopRendering(); |
| + |
| // Make window_id's surface current w/ the GL context, or release the context |
| // if |window_id < 0|. |
| void MakeCurrent(int window_id); |
| + void RenderContent(); |
| + void DrawTexture(const gfx::Rect &area, |
| + uint32 texture_target, |
| + uint32 texture_id); |
| + |
| base::MessageLoop* message_loop_; |
| - std::vector<gfx::Size> window_dimensions_; |
| std::vector<gfx::Size> frame_dimensions_; |
| NativeContextType gl_context_; |
| @@ -103,25 +116,31 @@ class RenderingHelper { |
| #if defined(GL_VARIANT_EGL) |
| EGLDisplay gl_display_; |
| - std::vector<EGLSurface> gl_surfaces_; |
| + EGLSurface gl_surface_; |
| #else |
| XVisualInfo* x_visual_; |
| #endif |
| #if defined(OS_WIN) |
| - std::vector<HWND> windows_; |
| + HWND window_; |
| #else |
| Display* x_display_; |
| - std::vector<Window> x_windows_; |
| + Window x_window_; |
| #endif |
| + std::vector<gfx::Rect> render_areas_; |
| + std::vector<uint32> texture_ids_; |
| + std::vector<uint32> texture_targets_; |
| + |
| bool render_as_thumbnails_; |
| + RenderingState rendering_state_; |
| int frame_count_; |
| GLuint thumbnails_fbo_id_; |
| GLuint thumbnails_texture_id_; |
| gfx::Size thumbnails_fbo_size_; |
| gfx::Size thumbnail_size_; |
| GLuint program_; |
| + base::TimeDelta frame_duration_; |
| DISALLOW_COPY_AND_ASSIGN(RenderingHelper); |
| }; |