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.
This commit is contained in:
Kristian Høgsberg 2012-07-16 15:08:13 -04:00
parent 44f066b9ff
commit 7250cd506b
4 changed files with 7 additions and 7 deletions

View file

@ -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;
}

View file

@ -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

View file

@ -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);

View file

@ -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;