diff options
Diffstat (limited to 'src/egl/main/eglsurface.h')
-rw-r--r-- | src/egl/main/eglsurface.h | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index 0d64d20dd42..0a00035730f 100644 --- a/src/egl/main/eglsurface.h +++ b/src/egl/main/eglsurface.h @@ -20,27 +20,34 @@ struct _egl_surface _EGLConfig *Config; EGLint Type; /* one of EGL_WINDOW_BIT, EGL_PIXMAP_BIT or EGL_PBUFFER_BIT */ + + /* attributes set by attribute list */ EGLint Width, Height; - EGLint TextureFormat, TextureTarget; - EGLint MipmapTexture, MipmapLevel; + EGLenum TextureFormat; + EGLenum TextureTarget; + EGLBoolean MipmapTexture; + EGLBoolean LargestPbuffer; + EGLenum RenderBuffer; + EGLenum VGAlphaFormat; + EGLenum VGColorspace; + + /* attributes set by eglSurfaceAttrib */ + EGLint MipmapLevel; + EGLenum MultisampleResolve; + EGLenum SwapBehavior; + + EGLint HorizontalResolution, VerticalResolution; + EGLint AspectRatio; + EGLint SwapInterval; /* True if the surface is bound to an OpenGL ES texture */ EGLBoolean BoundToTexture; - -#ifdef EGL_VERSION_1_2 - EGLint SwapBehavior; /* one of EGL_BUFFER_PRESERVED/DESTROYED */ - EGLint HorizontalResolution, VerticalResolution; - EGLint AspectRatio; - EGLint RenderBuffer; /* EGL_BACK_BUFFER or EGL_SINGLE_BUFFER */ - EGLint AlphaFormat; /* EGL_ALPHA_FORMAT_NONPRE or EGL_ALPHA_FORMAT_PRE */ - EGLint Colorspace; /* EGL_COLORSPACE_sRGB or EGL_COLORSPACE_LINEAR */ -#endif /* EGL_VERSION_1_2 */ }; PUBLIC EGLBoolean -_eglInitSurface(_EGLDriver *drv, _EGLSurface *surf, EGLint type, +_eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type, _EGLConfig *config, const EGLint *attrib_list); @@ -100,6 +107,9 @@ _eglCreatePbufferFromClientBuffer(_EGLDriver *drv, _EGLDisplay *dpy, /** * Return true if there is a context bound to the surface. + * + * The binding is considered a reference to the surface. Drivers should not + * destroy a surface when it is bound. */ static INLINE EGLBoolean _eglIsSurfaceBound(_EGLSurface *surf) @@ -159,6 +169,9 @@ _eglGetSurfaceHandle(_EGLSurface *surf) /** * Return true if the surface is linked to a display. + * + * The link is considered a reference to the surface (the display is owning the + * surface). Drivers should not destroy a surface when it is linked. */ static INLINE EGLBoolean _eglIsSurfaceLinked(_EGLSurface *surf) |