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

Unified Diff: content/common/gpu/media/rendering_helper.h

Issue 400353007: rendering_helper - Use real GLSurface and GLContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bd9e65772ea92d5aff79978ee8ed9ecd639785cc..a2dfb1bbf492690104ee2f183aa076ccfc60a3a3 100644
--- a/content/common/gpu/media/rendering_helper.h
+++ b/content/common/gpu/media/rendering_helper.h
@@ -14,20 +14,14 @@
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gl/gl_bindings.h"
+#include "ui/gl/gl_context.h"
+#include "ui/gl/gl_surface.h"
namespace base {
class MessageLoop;
class WaitableEvent;
}
-#if !defined(OS_WIN) && defined(ARCH_CPU_X86_FAMILY)
-#define GL_VARIANT_GLX 1
-typedef GLXContext NativeContextType;
-#else
-#define GL_VARIANT_EGL 1
-typedef EGLContext NativeContextType;
-#endif
-
namespace content {
struct RenderingHelperParams;
@@ -53,6 +47,8 @@ class RenderingHelper {
RenderingHelper();
~RenderingHelper();
+ static bool InitializeOneOff();
+
// Create the render context and windows by the specified dimensions.
void Initialize(const RenderingHelperParams& params,
base::WaitableEvent* done);
@@ -82,7 +78,7 @@ class RenderingHelper {
void* GetGLDisplay();
// Get the platform specific handle to the OpenGL context.
- NativeContextType GetGLContext();
+ void* GetGLContext();
// Get rendered thumbnails as RGB.
// Sets alpha_solid to true if the alpha channel is entirely 0xff.
@@ -101,21 +97,10 @@ class RenderingHelper {
scoped_ptr<base::RepeatingTimer<RenderingHelper> > render_timer_;
base::MessageLoop* message_loop_;
- NativeContextType gl_context_;
-
-#if defined(GL_VARIANT_EGL)
- EGLDisplay gl_display_;
- EGLSurface gl_surface_;
-#else
- XVisualInfo* x_visual_;
-#endif
-
-#if defined(OS_WIN)
- HWND window_;
-#else
- Display* x_display_;
- Window x_window_;
-#endif
+ scoped_refptr<gfx::GLContext> gl_context_;
+ scoped_refptr<gfx::GLSurface> gl_surface_;
+
+ gfx::AcceleratedWidget window_;
gfx::Size screen_size_;
« no previous file with comments | « no previous file | content/common/gpu/media/rendering_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698