From 9e3f1e0d4cea72fde441a725b4b6dbd736387fac Mon Sep 17 00:00:00 2001 From: Robert Bradford Date: Tue, 9 Oct 2007 13:56:29 +0000 Subject: [PATCH] 2007-10-09 Rob Bradford * clutter/eglnative/clutter-backend-egl.c: (clutter_backend_egl_dispose): Call eglTerminate() on the display when the backend is disposed of. * clutter/eglnative/clutter-stage-egl.c: (clutter_stage_egl_realize): Don't use the createNativeWindow() call, it's not generic EGL. --- ChangeLog | 10 ++++++++++ clutter/eglnative/clutter-backend-egl.c | 6 ++++++ clutter/eglnative/clutter-stage-egl.c | 10 +--------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 27ebedcc3..30bbd7932 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-10-09 Rob Bradford + + * clutter/eglnative/clutter-backend-egl.c: + (clutter_backend_egl_dispose): + Call eglTerminate() on the display when the backend is disposed of. + + * clutter/eglnative/clutter-stage-egl.c: + (clutter_stage_egl_realize): + Don't use the createNativeWindow() call, it's not generic EGL. + 2007-10-09 Emmanuele Bassi * clutter/clutter-script-private.h: diff --git a/clutter/eglnative/clutter-backend-egl.c b/clutter/eglnative/clutter-backend-egl.c index 243d9fa67..2e019bfc0 100644 --- a/clutter/eglnative/clutter-backend-egl.c +++ b/clutter/eglnative/clutter-backend-egl.c @@ -134,6 +134,12 @@ clutter_backend_egl_dispose (GObject *gobject) backend_egl->stage = NULL; } + if (backend_egl->edpy) + { + eglTerminate (backend_egl->edpy); + backend_egl->edpy = NULL; + } + G_OBJECT_CLASS (clutter_backend_egl_parent_class)->dispose (gobject); } diff --git a/clutter/eglnative/clutter-stage-egl.c b/clutter/eglnative/clutter-stage-egl.c index 5caee0fd7..071065977 100644 --- a/clutter/eglnative/clutter-stage-egl.c +++ b/clutter/eglnative/clutter-stage-egl.c @@ -15,9 +15,6 @@ G_DEFINE_TYPE (ClutterStageEGL, clutter_stage_egl, CLUTTER_TYPE_STAGE); -/* NOTE: EGL implementation needs to provide this function */ -extern NativeWindowType createNativeWindow(void); - static void clutter_stage_egl_show (ClutterActor *actor) { @@ -80,8 +77,6 @@ clutter_stage_egl_realize (ClutterActor *actor) if (G_LIKELY (!is_offscreen)) { - NativeWindowType window; - EGLint cfg_attribs[] = { EGL_BUFFER_SIZE, EGL_DONT_CARE, EGL_RED_SIZE, 5, EGL_GREEN_SIZE, 6, @@ -115,13 +110,10 @@ clutter_stage_egl_realize (ClutterActor *actor) if (stage_egl->egl_surface) eglDestroySurface (clutter_egl_display(), stage_egl->egl_surface); - /* EGL Implementation needs to provide createNativeWindow() */ - window = createNativeWindow(); - stage_egl->egl_surface = eglCreateWindowSurface (clutter_egl_display(), configs[0], - window, + NULL, NULL); eglQuerySurface (clutter_egl_display(),