On Tue, Aug 7, 2012 at 2:15 PM, Ander Conselvan de Oliveira <conselv...@gmail.com> wrote: > I like to have the allocate function try to resize the pool if needed. All > users except wayland-cursor allocate a pool large enough, so they should > never reach and on the other hand its convenient not to have to write the > resize logic every time one needs it. > > I would go for having the resize by default, and if there is a use case > where we really don't want to resize, we could have something like: > > enum wl_shm_mapping_resize_behavior { > /* never try to resize */ > WL_SHM_MAPPING_RESIZE_NEVER, > > /* try to resize to current size + new allocation size */ > WL_SHM_MAPPING_RESIZE_ADD_SIZE, > > /* double the allocation size until it is large enough */ > WL_SHM_MAPPING_RESIZE_DOUBLE, > > ... > };
I like that, that's flexible enough for now and the enum can be extended when required without API/ABI breakage. Thanks, Andre _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel