Esempio n. 1
0
void
VIVANTE_HideWindow(_THIS, SDL_Window * window)
{
#if SDL_VIDEO_DRIVER_VIVANTE_VDK
    SDL_WindowData *data = window->driverdata;
    vdkHideWindow(data->native_window);
#endif
}
Esempio n. 2
0
/*
    vdkFinishEGL

    EGL wrapper to release all resouces hold by the VDK and EGL.

    PARAMETERS:

        vdkEGL * Egl
            Pointer to a vdkEGL structure filled in by vdkSetupEGL.

    RETURNS:

        Nothing.
*/
VDKAPI void VDKLANG
vdkFinishEGL(
    vdkEGL * Egl
    )
{
    /* Only process a valid EGL pointer. */
    if (Egl != NULL)
    {
        /* Only process a valid EGLDisplay pointer. */
        if (Egl->eglDisplay != EGL_NO_DISPLAY)
        {
            /* Unbind everything from the EGL context. */
            Egl->eglMakeCurrent(Egl->eglDisplay, NULL, NULL, NULL);

            if (Egl->eglContext != EGL_NO_CONTEXT)
            {
                /* Destroy the EGL context. */
                Egl->eglDestroyContext(Egl->eglDisplay, Egl->eglContext);
                Egl->eglContext = EGL_NO_CONTEXT;
            }

            if (Egl->eglSurface != EGL_NO_SURFACE)
            {
                /* Destroy the EGL surface. */
                Egl->eglDestroySurface(Egl->eglDisplay, Egl->eglSurface);
                Egl->eglSurface = EGL_NO_SURFACE;
            }

            /* Terminate the EGL display. */
            Egl->eglTerminate(Egl->eglDisplay);
            Egl->eglDisplay = EGL_NO_DISPLAY;

            /* Release thread data. */
            Egl->eglReleaseThread();
        }

        if (Egl->window != 0)
        {
            /* Hide the window. */
            vdkHideWindow(
                Egl->window
                );

            /* Destroy the window. */
            vdkDestroyWindow(
                Egl->window
                );
            Egl->window = 0;
        }

        if (Egl->display != NULL)
        {
            /* Destroy the display. */
            vdkDestroyDisplay(Egl->display);
            Egl->display = NULL;
        }

        if (Egl->vdk != NULL)
        {
            /* Destroy the VDK. */
            vdkExit(Egl->vdk);
            Egl->vdk = NULL;
        }
    }
}