compositor-android: should output be added to compositor one step before

Kristian Høgsberg hoegsberg at gmail.com
Thu Sep 13 08:28:40 PDT 2012


On Thu, Sep 13, 2012 at 12:46:33PM +0300, Pekka Paalanen wrote:
> On Thu, 13 Sep 2012 00:18:52 -0700
> Abhijit Potnis <abhijitpotnis at gmail.com> wrote:
> 
> > Hello Pekka,
> > 
> > In compositor-android.c , Should we be calling
> > android_compositor_add_output() before gles2_renderer_init(),
> > or else wouldn't "op" in gles-renderer_init get assigned a junk value.
> 
> Hi Abhijit,
> 
> yes, looks like you are completely right.
> 
> The problem was introduced in 2bc5e8eaf89967f55b63c31f58f8e3a8d7f8810e
> and I think it went without noticing, because the android backend needs
> to open the framebuffer before it can choose an EGLConfig. The
> android_output object is created before EGL init, but not added to the
> compositor's output list until it has an EGLSurface. It was just missed
> when code was being moved around and consolidated into
> gles2_renderer_init().
> 
> Kristian, can you push this patch with
> Reviewed-by: Pekka Paalanen <ppaalanen at gmail.com>
> please?

Yup, looks like I missed that when I did the renderer abstraction
work.  Committed with Reviewed-by and Signed-off.  Abhijit, please use
git send-email when sending patches, it's a lot easier for everybody :)

Kristian

> It will take a while before I can actually test this.
> 
> > ---
> >  src/compositor-android.c |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/compositor-android.c b/src/compositor-android.c
> > index 50c66e6..0194379 100644
> > --- a/src/compositor-android.c
> > +++ b/src/compositor-android.c
> > @@ -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;
> 
> Thanks,
> pq


More information about the wayland-devel mailing list