On Wed, Nov 15, 2017 at 9:27 AM, Gwan-gyeong Mun <elong...@gmail.com> wrote: > This is added for preventing adding of new color buffers structure and back* > when new platform backend is added. > This refactoring separates out the common and platform specific bits. > This makes odd casting in the platform_foo.c but it prevents adding of new > ifdef magic. > Because of color_buffers array size is different on android and wayland /drm, > it adds COLOR_BUFFERS_SIZE macro. > - android's color buffers array size is 3. > drm & wayland's color buffers array size is 4. > > Fixes from Rob's review: > - refactor to separate out the common and platform specific bits. > > Fixes from Emil's review: > - use suggested color buffers structure shape. > it makes a buffer pointer of each platform to void pointer type. > > v2: Fixes from Emil's review > a) change ifdef macro of "HAVE_WAYLAND_PLATFORM or HAVE_DRM_PLATFORM" to > "HAVE_ANDROID_PLATFORM" for COLOR_BUFFERS_SIZE. > b) drop the unneeded indentation of comment. > c) drop ifdef macro of HAVE_WAYLAND_PLATFORM from color_buffers structure > for more generic and widespread helpers. > d) drop unneeded $native_type -> void * cast and viceversa. > e) create the local native_buffer of $native_type and cast on assignment. > > Signed-off-by: Mun Gwan-gyeong <elong...@gmail.com> > --- > src/egl/drivers/dri2/egl_dri2.h | 32 ++++++++---------- > src/egl/drivers/dri2/platform_android.c | 10 +++--- > src/egl/drivers/dri2/platform_drm.c | 60 > ++++++++++++++++++--------------- > src/egl/drivers/dri2/platform_wayland.c | 41 +++++++++++----------- > 4 files changed, 73 insertions(+), 70 deletions(-)
Reviewed-by: Rob Herring <r...@kernel.org> _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev