target,
buffer);
+ if (!yagl_validate_display(dpy_, &dpy)) {
+ goto out;
+ }
+
+ if (target == EGL_GL_TEXTURE_2D_KHR) {
+ if (!yagl_validate_context(dpy, ctx_, &ctx)) {
+ goto out;
+ }
+
+ yagl_sharegroup_mutex_lock_if_shared(ctx->client_ctx->sg);
+ }
+
iface = yagl_get_any_client_interface();
if (!iface) {
goto out;
}
- if (!yagl_validate_display(dpy_, &dpy)) {
- goto out;
- }
-
switch (target) {
case EGL_NATIVE_PIXMAP_KHR:
if (!dpy->native_dpy->platform->pixmaps_supported) {
}
}
- if (!yagl_validate_context(dpy, ctx_, &ctx)) {
- goto out;
- }
-
- yagl_sharegroup_mutex_lock_if_shared(ctx->client_ctx->sg);
-
image = yagl_get_backend()->create_image_gl_texture_2d(dpy,
ctx,
(yagl_object_name)VOIDP2INT(buffer),
iface);
- yagl_sharegroup_mutex_unlock_if_shared(ctx->client_ctx->sg);
-
if (!image) {
goto out;
}
out:
yagl_image_release(image);
+ if (target == EGL_GL_TEXTURE_2D_KHR) {
+ yagl_sharegroup_mutex_unlock_if_shared(ctx->client_ctx->sg);
+ }
+
yagl_context_release(ctx);
YAGL_LOG_FUNC_EXIT("%p", ret);
YAGL_GET_CTX();
- yagl_sharegroup_mutex_lock_if_shared(ctx->base.sg);
-
if (framebuffer != 0) {
framebuffer_obj = (struct yagl_gles_framebuffer*)yagl_namespace_acquire(&ctx->framebuffers,
framebuffer);
out:
yagl_gles_framebuffer_release(framebuffer_obj);
- yagl_sharegroup_mutex_unlock_if_shared(ctx->base.sg);
-
YAGL_LOG_FUNC_EXIT(NULL);
}
YAGL_GET_CTX();
- yagl_sharegroup_mutex_lock_if_shared(ctx->base.sg);
-
if (n < 0) {
YAGL_SET_ERR(GL_INVALID_VALUE);
goto out;
}
out:
- yagl_sharegroup_mutex_unlock_if_shared(ctx->base.sg);
-
YAGL_LOG_FUNC_EXIT(NULL);
}
YAGL_GET_CTX();
- yagl_sharegroup_mutex_lock_if_shared(ctx->base.sg);
-
if (n < 0) {
YAGL_SET_ERR(GL_INVALID_VALUE);
goto out;
}
yagl_free(framebuffers);
- yagl_sharegroup_mutex_unlock_if_shared(ctx->base.sg);
-
YAGL_LOG_FUNC_EXIT(NULL);
}
yagl_transport_put_out_GLenum(t, target);
yagl_transport_put_out_GLuint(t, buffer);
yagl_transport_end(t);
+ yagl_transport_flush(t, NULL);
}
/*
yagl_transport_put_out_GLenum(t, target);
yagl_transport_put_out_GLuint(t, texture);
yagl_transport_end(t);
+ yagl_transport_flush(t, NULL);
}
/*
yagl_transport_begin(t, yagl_api_id_gles, 63, 2 * 8, 0 * 8 + yagl_transport_array_size(framebuffers, framebuffers_count, sizeof(GLuint)));
yagl_transport_put_out_array(t, framebuffers, framebuffers_count, sizeof(GLuint));
yagl_transport_end(t);
- yagl_transport_flush(t, NULL);
}
/*
yagl_transport_put_out_GLenum(t, target);
yagl_transport_put_out_GLuint(t, renderbuffer);
yagl_transport_end(t);
+ yagl_transport_flush(t, NULL);
}
/*