[Cogl] [PATCH 1/2] kms: Rename gbm_bo_get_pitch to gbm_bo_get_stride
Robert Bragg
robert at sixbynine.org
Wed Aug 15 08:56:31 PDT 2012
Yeah I made a similar patch for this the other day too except I tried
to explicitly check the version of libgbm at configure time and
provide COGL_GBM_{MAJOR,MINOR,MICRO} defines we can use in the C code
and conditionally use the _get_stride or _get_pitch api depending on
the version.
I haven't made a tidy patch for this yet but this is the fragment I
added to the configure.ac:
+ GBM_VERSION=`$PKG_CONFIG --modversion gbm`
+ GBM_MAJOR=`echo $GBM_VERSION | cut -d'.' -f1`
+ GBM_MINOR=`echo $GBM_VERSION | cut -d'.' -f2`
+ GBM_MICRO=`echo $GBM_VERSION | cut -d'.' -f3`
+
+ AC_DEFINE_UNQUOTED([COGL_GBM_MAJOR], [$GBM_MAJOR], [The major
version for libgbm])
+ AC_DEFINE_UNQUOTED([COGL_GBM_MINOR], [$GBM_MINOR], [The minor
version for libgbm])
+ AC_DEFINE_UNQUOTED([COGL_GBM_MICRO], [$GBM_MICRO], [The micro
version for libgbm])
+
I'll look at making a clean patch and send that out for you to take a look at.
kind regards,
- Robert
On Mon, Aug 13, 2012 at 3:43 PM, Neil Roberts <neil at linux.intel.com> wrote:
> Mesa has renamed the function so we need to rename it in Cogl too.
>
> http://cgit.freedesktop.org/mesa/mesa/commit/?id=7250cd506baa0
> ---
> cogl/winsys/cogl-winsys-egl-kms.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c
> index f341731..32f5289 100644
> --- a/cogl/winsys/cogl-winsys-egl-kms.c
> +++ b/cogl/winsys/cogl-winsys-egl-kms.c
> @@ -659,7 +659,7 @@ _cogl_winsys_onscreen_swap_buffers (CoglOnscreen *onscreen)
> /* Now we need to set the CRTC to whatever is the front buffer */
> kms_onscreen->next_bo = gbm_surface_lock_front_buffer (kms_onscreen->surface);
>
> - pitch = gbm_bo_get_pitch (kms_onscreen->next_bo);
> + pitch = gbm_bo_get_stride (kms_onscreen->next_bo);
> handle = gbm_bo_get_handle (kms_onscreen->next_bo).u32;
>
> if (drmModeAddFB (kms_renderer->fd,
> --
> 1.7.11.3.g3c3efa5
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl
More information about the Cogl
mailing list