egl: Move surface functions in egldisplay.[ch] to eglsurface.[ch]
Move functions to where they should be. There should be no real change here.
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
|
||||
#include "egltypedefs.h"
|
||||
#include "egldefines.h"
|
||||
#include "eglsurface.h"
|
||||
|
||||
|
||||
/**
|
||||
@@ -80,14 +79,6 @@ PUBLIC void
|
||||
_eglCleanupDisplay(_EGLDisplay *disp);
|
||||
|
||||
|
||||
extern EGLSurface
|
||||
_eglLinkSurface(_EGLSurface *surf, _EGLDisplay *dpy);
|
||||
|
||||
|
||||
extern void
|
||||
_eglUnlinkSurface(_EGLSurface *surf);
|
||||
|
||||
|
||||
#ifndef _EGL_SKIP_HANDLE_CHECK
|
||||
|
||||
|
||||
@@ -95,10 +86,6 @@ extern EGLBoolean
|
||||
_eglCheckDisplayHandle(EGLDisplay dpy);
|
||||
|
||||
|
||||
extern EGLBoolean
|
||||
_eglCheckSurfaceHandle(EGLSurface surf, _EGLDisplay *dpy);
|
||||
|
||||
|
||||
#else /* !_EGL_SKIP_HANDLE_CHECK */
|
||||
|
||||
/* Only do a quick check. This is NOT standard compliant. */
|
||||
@@ -110,14 +97,6 @@ _eglCheckDisplayHandle(EGLDisplay dpy)
|
||||
}
|
||||
|
||||
|
||||
static INLINE EGLBoolean
|
||||
_eglCheckSurfaceHandle(EGLSurface surf, _EGLDisplay *dpy)
|
||||
{
|
||||
_EGLSurface *s = (_EGLSurface *) surf;
|
||||
return (dpy && s && s->Display == dpy);
|
||||
}
|
||||
|
||||
|
||||
#endif /* _EGL_SKIP_HANDLE_CHECK */
|
||||
|
||||
|
||||
@@ -155,40 +134,6 @@ _eglIsDisplayLinked(_EGLDisplay *dpy)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Lookup a handle to find the linked surface.
|
||||
* Return NULL if the handle has no corresponding linked surface.
|
||||
*/
|
||||
static INLINE _EGLSurface *
|
||||
_eglLookupSurface(EGLSurface surface, _EGLDisplay *dpy)
|
||||
{
|
||||
_EGLSurface *surf = (_EGLSurface *) surface;
|
||||
if (!_eglCheckSurfaceHandle(surf, dpy))
|
||||
surf = NULL;
|
||||
return surf;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return the handle of a linked surface, or EGL_NO_SURFACE.
|
||||
*/
|
||||
static INLINE EGLSurface
|
||||
_eglGetSurfaceHandle(_EGLSurface *surf)
|
||||
{
|
||||
return (EGLSurface) ((surf && surf->Display) ? surf : EGL_NO_SURFACE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return true if the surface is linked to a display.
|
||||
*/
|
||||
static INLINE EGLBoolean
|
||||
_eglIsSurfaceLinked(_EGLSurface *surf)
|
||||
{
|
||||
return (EGLBoolean) (_eglGetSurfaceHandle(surf) != EGL_NO_SURFACE);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Cast an unsigned int to a pointer.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user