On Mon, Oct 19, 2015 at 05:42:53PM -0700, Bryce Harrington wrote: > On Sat, Oct 17, 2015 at 07:24:13PM +0300, Giulio Camuffo wrote: > > This commit introduces the structs weston_backend_config and > > weston_backend_output_config, to prepare for the new config > > system for the backends. > > --- > > src/compositor.h | 36 ++++++++++++++++++++++++++++++++++-- > > 1 file changed, 34 insertions(+), 2 deletions(-) > > > > diff --git a/src/compositor.h b/src/compositor.h > > index 2e2a185..172de6f 100644 > > --- a/src/compositor.h > > +++ b/src/compositor.h > > @@ -610,9 +610,41 @@ enum weston_capability { > > WESTON_CAP_VIEW_CLIP_MASK = 0x0010, > > }; > > > > +/* Configuration struct for an output. > > + * > > + * This struct is used to pass the configuration for an output > > + * to the compositor backend when creating a new output. > > + * The backend can subclass this struct to handle backend > > + * specific data. > > + */ > > +struct weston_backend_output_config { > > + uint32_t transform; > > + int32_t width; > > + int32_t height; > > + int scale; > > Do we expect to ever have negative values for width, height, or scale? > If not, would it make sense for these to also be uint32_t's?
Anyway, these params appear not to be used anywhere in this patchset yet, so suppose these can be further fiddled with subsequently. I'll send my nitpick as a followup patch. Reviewed-by: Bryce Harrington <br...@osg.samsung.com> Bryce > > +}; > > + > > +/* Configuration struct for a backend. > > + * > > + * This struct carries the configuration for a backend, and it's > > + * passed to the backend's init entry point. The backend will > > + * likely want to subclass this in order to handle backend specific > > + * data. > > + */ > > +struct weston_backend_config { > > +}; > > + > > struct weston_backend { > > - void (*destroy)(struct weston_compositor *ec); > > - void (*restore)(struct weston_compositor *ec); > > + void (*destroy)(struct weston_compositor *compositor); > > + void (*restore)(struct weston_compositor *compositor); > > + /* vfunc to create a new output with a given name and config. > > + * backends not supporting the functionality will set this > > + * to NULL. > > + */ > > + struct weston_output * > > + (*create_output)(struct weston_compositor *compositor, > > + const char *name, > > + struct weston_backend_output_config *config); > > }; > > > > struct weston_compositor { > > -- > > 2.6.1 > > > > _______________________________________________ > > wayland-devel mailing list > > wayland-devel@lists.freedesktop.org > > http://lists.freedesktop.org/mailman/listinfo/wayland-devel > _______________________________________________ > wayland-devel mailing list > wayland-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/wayland-devel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel