summaryrefslogtreecommitdiffstats
path: root/chromium/ui/gl/gl_surface_egl.h
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/ui/gl/gl_surface_egl.h')
-rw-r--r--chromium/ui/gl/gl_surface_egl.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/chromium/ui/gl/gl_surface_egl.h b/chromium/ui/gl/gl_surface_egl.h
index 0acc9af52a2..4c2892822ec 100644
--- a/chromium/ui/gl/gl_surface_egl.h
+++ b/chromium/ui/gl/gl_surface_egl.h
@@ -13,7 +13,6 @@
#include "base/compiler_specific.h"
#include "base/time/time.h"
-#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
#include "ui/gfx/vsync_provider.h"
#include "ui/gl/gl_bindings.h"
@@ -21,6 +20,9 @@
namespace gfx {
+// Get default EGL display for GLSurfaceEGL (differs by platform).
+EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay();
+
// Interface for EGL surface.
class GL_EXPORT GLSurfaceEGL : public GLSurface {
public:
@@ -39,6 +41,7 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface {
static const char* GetEGLExtensions();
static bool HasEGLExtension(const char* name);
static bool IsCreateContextRobustnessSupported();
+ static bool IsEGLSurfacelessContextSupported();
protected:
virtual ~GLSurfaceEGL();
@@ -50,7 +53,7 @@ class GL_EXPORT GLSurfaceEGL : public GLSurface {
// Encapsulates an EGL surface bound to a view.
class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
public:
- explicit NativeViewGLSurfaceEGL(gfx::AcceleratedWidget window);
+ explicit NativeViewGLSurfaceEGL(EGLNativeWindowType window);
// Implement GLSurface.
virtual EGLConfig GetConfig() OVERRIDE;
@@ -62,23 +65,24 @@ class GL_EXPORT NativeViewGLSurfaceEGL : public GLSurfaceEGL {
virtual bool SwapBuffers() OVERRIDE;
virtual gfx::Size GetSize() OVERRIDE;
virtual EGLSurface GetHandle() OVERRIDE;
- virtual std::string GetExtensions() OVERRIDE;
+ virtual bool SupportsPostSubBuffer() OVERRIDE;
virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
virtual VSyncProvider* GetVSyncProvider() OVERRIDE;
// Create a NativeViewGLSurfaceEGL with an externally provided VSyncProvider.
// Takes ownership of the VSyncProvider.
- virtual bool Initialize(VSyncProvider* sync_provider);
+ virtual bool Initialize(scoped_ptr<VSyncProvider> sync_provider);
protected:
virtual ~NativeViewGLSurfaceEGL();
void SetHandle(EGLSurface surface);
private:
- gfx::AcceleratedWidget window_;
+ EGLNativeWindowType window_;
EGLSurface surface_;
bool supports_post_sub_buffer_;
EGLConfig config_;
+ gfx::Size size_;
scoped_ptr<VSyncProvider> vsync_provider_;