On Fri, 3 Feb 2017 09:27:18 -0600 Derek Foreman <[email protected]> wrote:
> On 03/02/17 09:10 AM, Emilio Pozuelo Monfort wrote: > > We were calling weston_surface::committed on surfaces with > > no buffer attached. Stop doing that, since surface::committed > > will map the surfaces and put them in a visible layer. That may > > not be a problem for a single surface as it wouldn't be visible > > anyway because it's got no contents, but it is a problem if the > > surface has subsurfaces. > > > > This fixes the subsurface_mapped test, so mark it as expected > > to succeed. > > > > https://bugs.freedesktop.org/show_bug.cgi?id=94735 > > > > Signed-off-by: Emilio Pozuelo Monfort <[email protected]> > > --- > > libweston/compositor.c | 10 +++++++++- > > tests/subsurface-shot-test.c | 2 +- > > 2 files changed, 10 insertions(+), 2 deletions(-) > > > > diff --git a/libweston/compositor.c b/libweston/compositor.c > > index 81392063..8a018897 100644 > > --- a/libweston/compositor.c > > +++ b/libweston/compositor.c > > @@ -1589,6 +1589,12 @@ weston_surface_is_mapped(struct weston_surface > > *surface) > > return surface->is_mapped; > > } > > > > +static bool > > +weston_surface_has_content(struct weston_surface *surface) > > +{ > > + return surface->width > 0 && surface->height > 0; > > Are these going to be 0 if a NULL buffer is attached to an existing surface? > > A quick read has me thinking width_from_buffer and height_from_buffer > are reset on a NULL attach, but width and height only get updated on > commit - so depending on when this function is called it might not > return the expected result. Whatever happens, an attach without commit must not change those variables. If it does, it's a bug. Mind, that weston_surface_attach() is only called from weston_surface_commit_state(). Thanks, pq
pgpTCmojF9qNK.pgp
Description: OpenPGP digital signature
_______________________________________________ wayland-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/wayland-devel
