[Mesa-dev] [PATCH 3/8] loader/dri3: Unify the style of function pointer calls in structs
Boyan Ding
boyan.j.ding at gmail.com
Tue Nov 24 21:27:04 PST 2015
Signed-off-by: Boyan Ding <boyan.j.ding at gmail.com>
---
src/loader/loader_dri3_helper.c | 74 ++++++++++++++++++++---------------------
1 file changed, 37 insertions(+), 37 deletions(-)
diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index 62bfe84..ca0f7a0 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -100,9 +100,9 @@ dri3_free_render_buffer(struct loader_dri3_drawable *draw,
xcb_free_pixmap(draw->conn, buffer->pixmap);
xcb_sync_destroy_fence(draw->conn, buffer->sync_fence);
xshmfence_unmap_shm(buffer->shm_fence);
- (draw->ext->image->destroyImage)(buffer->image);
+ draw->ext->image->destroyImage(buffer->image);
if (buffer->linear_buffer)
- (draw->ext->image->destroyImage)(buffer->linear_buffer);
+ draw->ext->image->destroyImage(buffer->linear_buffer);
free(buffer);
}
@@ -111,7 +111,7 @@ loader_dri3_drawable_fini(struct loader_dri3_drawable *draw)
{
int i;
- (draw->ext->core->destroyDrawable)(draw->dri_drawable);
+ draw->ext->core->destroyDrawable(draw->dri_drawable);
for (i = 0; i < LOADER_DRI3_NUM_BUFFERS; i++) {
if (draw->buffers[i])
@@ -170,9 +170,9 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
/* Create a new drawable */
draw->dri_drawable =
- (draw->ext->image_driver->createNewDrawable)(dri_screen,
- dri_config,
- draw);
+ draw->ext->image_driver->createNewDrawable(dri_screen,
+ dri_config,
+ draw);
if (!draw->dri_drawable)
return 1;
@@ -739,7 +739,7 @@ loader_dri3_swap_buffers_msc(struct loader_dri3_drawable *draw,
++(*draw->stamp);
}
- (draw->ext->flush->invalidate)(draw->dri_drawable);
+ draw->ext->flush->invalidate(draw->dri_drawable);
return ret;
}
@@ -854,32 +854,32 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
goto no_image;
if (!draw->is_different_gpu) {
- buffer->image = (draw->ext->image->createImage)(draw->dri_screen,
- width, height,
- format,
- __DRI_IMAGE_USE_SHARE |
- __DRI_IMAGE_USE_SCANOUT,
- buffer);
+ buffer->image = draw->ext->image->createImage(draw->dri_screen,
+ width, height,
+ format,
+ __DRI_IMAGE_USE_SHARE |
+ __DRI_IMAGE_USE_SCANOUT,
+ buffer);
pixmap_buffer = buffer->image;
if (!buffer->image)
goto no_image;
} else {
- buffer->image = (draw->ext->image->createImage)(draw->dri_screen,
- width, height,
- format,
- 0,
- buffer);
+ buffer->image = draw->ext->image->createImage(draw->dri_screen,
+ width, height,
+ format,
+ 0,
+ buffer);
if (!buffer->image)
goto no_image;
buffer->linear_buffer =
- (draw->ext->image->createImage)(draw->dri_screen,
- width, height, format,
- __DRI_IMAGE_USE_SHARE |
- __DRI_IMAGE_USE_LINEAR,
- buffer);
+ draw->ext->image->createImage(draw->dri_screen,
+ width, height, format,
+ __DRI_IMAGE_USE_SHARE |
+ __DRI_IMAGE_USE_LINEAR,
+ buffer);
pixmap_buffer = buffer->linear_buffer;
if (!buffer->linear_buffer)
@@ -888,14 +888,14 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
/* X wants the stride, so ask the image for it
*/
- if (!(draw->ext->image->queryImage)(pixmap_buffer, __DRI_IMAGE_ATTRIB_STRIDE,
- &stride))
+ if (!draw->ext->image->queryImage(pixmap_buffer, __DRI_IMAGE_ATTRIB_STRIDE,
+ &stride))
goto no_buffer_attrib;
buffer->pitch = stride;
- if (!(draw->ext->image->queryImage)(pixmap_buffer, __DRI_IMAGE_ATTRIB_FD,
- &buffer_fd))
+ if (!draw->ext->image->queryImage(pixmap_buffer, __DRI_IMAGE_ATTRIB_FD,
+ &buffer_fd))
goto no_buffer_attrib;
xcb_dri3_pixmap_from_buffer(draw->conn,
@@ -926,10 +926,10 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
return buffer;
no_buffer_attrib:
- (draw->ext->image->destroyImage)(pixmap_buffer);
+ draw->ext->image->destroyImage(pixmap_buffer);
no_linear_buffer:
if (draw->is_different_gpu)
- (draw->ext->image->destroyImage)(buffer->image);
+ draw->ext->image->destroyImage(buffer->image);
no_image:
free(buffer);
no_buffer:
@@ -1078,19 +1078,19 @@ loader_dri3_create_image(xcb_connection_t *c,
* we've gotten the planar wrapper, pull the single plane out of it and
* discard the wrapper.
*/
- image_planar = (image->createImageFromFds)(dri_screen,
- bp_reply->width,
- bp_reply->height,
- image_format_to_fourcc(format),
- fds, 1,
- &stride, &offset, loaderPrivate);
+ image_planar = image->createImageFromFds(dri_screen,
+ bp_reply->width,
+ bp_reply->height,
+ image_format_to_fourcc(format),
+ fds, 1,
+ &stride, &offset, loaderPrivate);
close(fds[0]);
if (!image_planar)
return NULL;
- ret = (image->fromPlanar)(image_planar, 0, loaderPrivate);
+ ret = image->fromPlanar(image_planar, 0, loaderPrivate);
- (image->destroyImage)(image_planar);
+ image->destroyImage(image_planar);
return ret;
}
--
2.6.2
More information about the mesa-dev
mailing list