The naming is verbose and somewhat inconsistent. We have: dri2_init_surface dri2_fini_surface dri2_egl_surface_alloc_local_buffer dri2_egl_surface_free_local_buffers
I suggest you implement the following convention: dri2_surface_init dri2_surface_fini dri2_surface_alloc_attachment (instead of 'local_buffers') dri2_surface_free_attachments (instead of 'local_buffers') and instead of dri2_egl_surface_free_outdated_buffers_and_update_size, we can just have: dri2_surface_update And can you wrap these functions around the: #if defined(HAVE_WAYLAND_PLATFORM) || defined(HAVE_DRM_PLATFORM) || defined(HAVE_ANDROID_PLATFORM) pre-processors checks just to make clear what platforms use the attachment (aka 'local_buffers') functionality. On Tue, Oct 17, 2017 at 6:28 AM, Emil Velikov <emil.l.veli...@gmail.com> wrote: > Hi Gwan-gyeong, > > On 6 October 2017 at 22:38, Gwan-gyeong Mun <elong...@gmail.com> wrote: > > To share common free outdated buffers and update size code. > > This compares width and height arguments with current egl surface > dimension, > > if the compared surface dimension is differ, then it free local buffers > and > > updates dimension. > > > > In preparation to adding of new platform which uses this helper. > > > > v2: Fixes from Eric's review: > > a) Split out series of refactor for helpers to a separate series. > > b) Add the new helper function and use them to replace the old code > in the > > same patch. > > > > Signed-off-by: Mun Gwan-gyeong <elong...@gmail.com> > > The name dri2_egl_surface_free_outdated_buffers_and_update_size might > be a bit long/too verbose, but I'm out of ideas for alternative. > For the patch > Reviewed-by: Emil Velikov <emil.veli...@collabora.com> > > Side note: > We should be able to reuse this for platform_wayland, in the future. > > -Emil > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev