clients & tests: use eglGetPlatformDisplayEXT when supported
Reviewed-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
committed by
Bryce Harrington
parent
70eba3fbde
commit
51a7ae5f89
@@ -277,7 +277,9 @@ nested_client_create(void)
|
||||
/* get globals */
|
||||
wl_display_roundtrip(client->display);
|
||||
|
||||
client->egl_display = eglGetDisplay(client->display);
|
||||
client->egl_display =
|
||||
weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR,
|
||||
client->display, NULL);
|
||||
if (client->egl_display == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
#include "protocol/ivi-application-client-protocol.h"
|
||||
#define IVI_SURFACE_ID 9000
|
||||
|
||||
#include "../shared/platform.h"
|
||||
|
||||
#ifndef EGL_EXT_swap_buffers_with_damage
|
||||
#define EGL_EXT_swap_buffers_with_damage 1
|
||||
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)(EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects);
|
||||
@@ -151,7 +153,9 @@ init_egl(struct display *display, struct window *window)
|
||||
if (window->opaque || window->buffer_size == 16)
|
||||
config_attribs[9] = 0;
|
||||
|
||||
display->egl.dpy = eglGetDisplay(display->display);
|
||||
display->egl.dpy =
|
||||
weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR,
|
||||
display->display, NULL);
|
||||
assert(display->egl.dpy);
|
||||
|
||||
ret = eglInitialize(display->egl.dpy, &major, &minor);
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <wayland-egl.h>
|
||||
#include <GLES2/gl2.h>
|
||||
#include <EGL/egl.h>
|
||||
#include <EGL/eglext.h>
|
||||
|
||||
#include "window.h"
|
||||
|
||||
@@ -215,7 +216,9 @@ egl_state_create(struct wl_display *display)
|
||||
egl = calloc(1, sizeof *egl);
|
||||
assert(egl);
|
||||
|
||||
egl->dpy = eglGetDisplay(display);
|
||||
egl->dpy =
|
||||
weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR,
|
||||
display, NULL);
|
||||
assert(egl->dpy);
|
||||
|
||||
ret = eglInitialize(egl->dpy, &major, &minor);
|
||||
|
||||
+4
-1
@@ -5392,7 +5392,10 @@ init_egl(struct display *d)
|
||||
EGLint api = EGL_OPENGL_API;
|
||||
#endif
|
||||
|
||||
d->dpy = eglGetDisplay(d->display);
|
||||
d->dpy =
|
||||
weston_platform_get_egl_display(EGL_PLATFORM_WAYLAND_KHR,
|
||||
d->display, NULL);
|
||||
|
||||
if (!eglInitialize(d->dpy, &major, &minor)) {
|
||||
fprintf(stderr, "failed to initialize EGL\n");
|
||||
return -1;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <cairo.h>
|
||||
#include "../shared/config-parser.h"
|
||||
#include "../shared/zalloc.h"
|
||||
#include "../shared/platform.h"
|
||||
|
||||
#define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user