clients & tests: use eglCreatePlatformWindowSurfaceEXT when supported

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
Jonny Lamb
2015-03-20 15:26:53 +01:00
committed by Bryce Harrington
parent 671148f064
commit 4bdcb5732b
6 changed files with 40 additions and 18 deletions
+3 -4
View File
@@ -307,10 +307,9 @@ nested_client_create(void)
client->native = wl_egl_window_create(client->surface,
client->width, client->height);
client->egl_surface =
eglCreateWindowSurface(client->egl_display,
client->egl_config,
client->native, NULL);
client->egl_surface = weston_platform_create_egl_window (client->egl_display,
client->egl_config,
client->native, NULL);
eglMakeCurrent(client->egl_display, client->egl_surface,
client->egl_surface, client->egl_context);
+4 -3
View File
@@ -386,9 +386,10 @@ create_surface(struct window *window)
window->geometry.width,
window->geometry.height);
window->egl_surface =
eglCreateWindowSurface(display->egl.dpy,
display->egl.conf,
window->native, NULL);
weston_platform_create_egl_window(display->egl.dpy,
display->egl.conf,
window->native, NULL);
if (display->shell) {
create_xdg_surface(window, display);
+3 -3
View File
@@ -422,9 +422,9 @@ triangle_create_egl_surface(struct triangle *tri, int width, int height)
tri->wl_surface = widget_get_wl_surface(tri->widget);
tri->egl_window = wl_egl_window_create(tri->wl_surface, width, height);
tri->egl_surface = eglCreateWindowSurface(tri->egl->dpy,
tri->egl->conf,
tri->egl_window, NULL);
tri->egl_surface = weston_platform_create_egl_window(tri->egl->dpy,
tri->egl->conf,
tri->egl_window, NULL);
ret = eglMakeCurrent(tri->egl->dpy, tri->egl_surface,
tri->egl_surface, tri->egl->ctx);
+4 -4
View File
@@ -640,10 +640,10 @@ egl_window_surface_create(struct display *display,
rectangle->width,
rectangle->height);
surface->egl_surface = eglCreateWindowSurface(display->dpy,
display->argb_config,
surface->egl_window,
NULL);
surface->egl_surface =
weston_platform_create_egl_window(display->dpy,
display->argb_config,
surface->egl_window, NULL);
surface->cairo_surface =
cairo_gl_surface_create_for_egl(display->argb_device,