コード例 #1
0
ファイル: glx_platform.c プロジェクト: Jul13t/waffle
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;
}
コード例 #2
0
ファイル: glx_platform.c プロジェクト: jljusten/waffle
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;
}
コード例 #3
0
ファイル: wgbm_platform.c プロジェクト: dumbbell/waffle
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;
}
コード例 #4
0
ファイル: nacl_platform.c プロジェクト: Sonicadvance1/waffle
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;
}