Example #1
0
static bool
glx_platform_destroy(struct wcore_platform *wc_self)
{
    struct glx_platform *self = glx_platform(wc_self);
    bool ok = true;
    int error = 0;

    if (!self)
        return true;

    if (self->linux)
        ok &= linux_platform_destroy(self->linux);

    if (self->glxHandle) {
        error = dlclose(self->glxHandle);
        if (error) {
            ok &= false;
            wcore_errorf(WAFFLE_ERROR_UNKNOWN,
                         "dlclose(\"%s\") failed: %s",
                         libGL_filename, dlerror());
        }
    }

    ok &= wcore_platform_teardown(wc_self);
    free(self);
    return ok;
}
Example #2
0
static bool
glx_platform_destroy(struct wcore_platform *wc_self)
{
    struct glx_platform *self = glx_platform(wc_self);
    bool ok = true;

    if (!self)
        return true;

    if (self->linux)
        ok &= linux_platform_destroy(self->linux);

    ok &= wcore_platform_teardown(wc_self);
    free(self);
    return ok;
}
Example #3
0
static bool
wgbm_platform_destroy(struct wcore_platform *wc_self)
{
    struct wgbm_platform *self = wgbm_platform(wc_self);
    bool ok = true;

    if (!self)
        return true;

    unsetenv("EGL_PLATFORM");

    if (self->linux)
        ok &= linux_platform_destroy(self->linux);

    ok &= wcore_platform_teardown(wc_self);
    free(self);
    return ok;
}
Example #4
0
static bool
nacl_platform_destroy(struct wcore_platform *wc_self)
{
    struct nacl_platform *self = nacl_platform(wc_self);
    bool ok = true;

    if (!self)
        return true;

    ok &= wcore_platform_teardown(wc_self);

    nacl_container_teardown(self->nacl);

    if (self->dl_gl)
        ok &= nacl_dl_close(&self->wcore);

    free(self);
    return ok;
}