diff options
author | Emil Velikov <[email protected]> | 2018-08-09 15:11:38 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2018-08-24 11:53:20 +0100 |
commit | 7b4269a5e044dcebc7f08b933b57f1eb7ae0406e (patch) | |
tree | 804d0efa0a6fabdf996d0d08965d44f8b0fb8cf3 /src/egl/drivers/dri2 | |
parent | 7eb4a28d41c44d4457a40416305763faaf30ac3c (diff) |
egl/drm: use gbm_dri_surface() wrapper
Remove the explicit cast, using the appropriate wrapper instead.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Acked-by: Daniel Stone <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r-- | src/egl/drivers/dri2/platform_drm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index d42ef6b2f95..a0b4862e837 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -43,7 +43,7 @@ static struct gbm_bo * lock_front_buffer(struct gbm_surface *_surf) { - struct gbm_dri_surface *surf = (struct gbm_dri_surface *) _surf; + struct gbm_dri_surface *surf = gbm_dri_surface(_surf); struct dri2_egl_surface *dri2_surf = surf->dri_private; struct gbm_dri_device *device = gbm_dri_device(_surf->gbm); struct gbm_bo *bo; @@ -66,7 +66,7 @@ lock_front_buffer(struct gbm_surface *_surf) static void release_buffer(struct gbm_surface *_surf, struct gbm_bo *bo) { - struct gbm_dri_surface *surf = (struct gbm_dri_surface *) _surf; + struct gbm_dri_surface *surf = gbm_dri_surface(_surf); struct dri2_egl_surface *dri2_surf = surf->dri_private; for (unsigned i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) { @@ -80,7 +80,7 @@ release_buffer(struct gbm_surface *_surf, struct gbm_bo *bo) static int has_free_buffers(struct gbm_surface *_surf) { - struct gbm_dri_surface *surf = (struct gbm_dri_surface *) _surf; + struct gbm_dri_surface *surf = gbm_dri_surface(_surf); struct dri2_egl_surface *dri2_surf = surf->dri_private; for (unsigned i = 0; i < ARRAY_SIZE(dri2_surf->color_buffers); i++) |