From: Kristian Høgsberg Date: Mon, 16 Jul 2012 19:08:13 +0000 (-0400) Subject: gbm: Rename gbm_bo_get_pitch to gbm_bo_get_stride X-Git-Tag: mesa-9.0~1151 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7250cd506baa0bd4649b30d87509cdd0cbc06a57;p=platform%2Fupstream%2Fmesa.git gbm: Rename gbm_bo_get_pitch to gbm_bo_get_stride We use pitch for 'pixels per row' and stride for 'bytes per row' pretty consistently in mesa and most other places, so rename the gbm API. --- diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 3aa0616..f09f6ef 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -428,7 +428,7 @@ gbm_dri_bo_import(struct gbm_device *gbm, bo->base.base.gbm = gbm; bo->base.base.width = width; bo->base.base.height = height; - bo->base.base.pitch = stride; + bo->base.base.stride = stride; bo->base.base.format = gbm_format; dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_HANDLE, &bo->base.base.handle.s32); @@ -494,7 +494,7 @@ gbm_dri_bo_create(struct gbm_device *gbm, dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_HANDLE, &bo->base.base.handle.s32); dri->image->queryImage(bo->image, __DRI_IMAGE_ATTRIB_STRIDE, - (int *) &bo->base.base.pitch); + (int *) &bo->base.base.stride); return &bo->base.base; } diff --git a/src/gbm/main/gbm.c b/src/gbm/main/gbm.c index 2a83033..c58576d 100644 --- a/src/gbm/main/gbm.c +++ b/src/gbm/main/gbm.c @@ -196,12 +196,12 @@ gbm_bo_get_height(struct gbm_bo *bo) * gbm_bo_create() * * \param bo The buffer object - * \return The stride of the allocated buffer object + * \return The stride of the allocated buffer object in bytes */ GBM_EXPORT uint32_t -gbm_bo_get_pitch(struct gbm_bo *bo) +gbm_bo_get_stride(struct gbm_bo *bo) { - return bo->pitch; + return bo->stride; } /** Get the format of the buffer object diff --git a/src/gbm/main/gbm.h b/src/gbm/main/gbm.h index 52afdf7f..9d2a030 100644 --- a/src/gbm/main/gbm.h +++ b/src/gbm/main/gbm.h @@ -244,7 +244,7 @@ uint32_t gbm_bo_get_height(struct gbm_bo *bo); uint32_t -gbm_bo_get_pitch(struct gbm_bo *bo); +gbm_bo_get_stride(struct gbm_bo *bo); uint32_t gbm_bo_get_format(struct gbm_bo *bo); diff --git a/src/gbm/main/gbmint.h b/src/gbm/main/gbmint.h index ab23f0a..a467bea 100644 --- a/src/gbm/main/gbmint.h +++ b/src/gbm/main/gbmint.h @@ -90,7 +90,7 @@ struct gbm_bo { struct gbm_device *gbm; uint32_t width; uint32_t height; - uint32_t pitch; + uint32_t stride; uint32_t format; union gbm_bo_handle handle; void *user_data;