compositor-android: Add output before gles2_renderer_init()
authorAbhijit Potnis <abhijitpotnis@gmail.com>
Thu, 13 Sep 2012 15:22:55 +0000 (11:22 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 13 Sep 2012 15:23:06 +0000 (11:23 -0400)
Calling android_compositor_add_output() before gles2_renderer_init(),
or else in gles-renderer_init will have an invalid EGLSurface.

Signed-off-by: Abhijit Potnis <abhijitpotnis@gmail.com>
Reviewed-by: Pekka Paalanen <ppaalanen@gmail.com>
src/compositor-android.c

index 50c66e6..3c0273a 100644 (file)
@@ -476,11 +476,11 @@ android_compositor_create(struct wl_display *display, int argc, char *argv[],
        if (android_init_egl(compositor, output) < 0)
                goto err_output;
 
+       android_compositor_add_output(compositor, output);
+
        if (gles2_renderer_init(&compositor->base) < 0)
                goto err_egl;
 
-       android_compositor_add_output(compositor, output);
-
        compositor->seat = android_seat_create(compositor);
        if (!compositor->seat)
                goto err_egl;