Module: Mesa
Branch: master
Commit: 1411fbd50dbd654755dd53cd087b86fffbd2c9ed
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1411fbd50dbd654755dd53cd087b86fffbd2c9ed

Author: Boyan Ding <boyan.j.d...@gmail.com>
Date:   Wed Nov 25 13:27:04 2015 +0800

loader/dri3: Unify the style of function pointer calls in structs

Signed-off-by: Boyan Ding <boyan.j.d...@gmail.com>

---

 src/loader/loader_dri3_helper.c | 78 ++++++++++++++++++++---------------------
 1 file changed, 39 insertions(+), 39 deletions(-)

diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
index ca02e97..6e5d1b8 100644
--- a/src/loader/loader_dri3_helper.c
+++ b/src/loader/loader_dri3_helper.c
@@ -95,9 +95,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);
 }
 
@@ -106,7 +106,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])
@@ -171,9 +171,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;
@@ -740,7 +740,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;
 }
@@ -856,34 +856,34 @@ 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 |
-                                                      
__DRI_IMAGE_USE_BACKBUFFER,
-                                                      buffer);
+      buffer->image = draw->ext->image->createImage(draw->dri_screen,
+                                                    width, height,
+                                                    format,
+                                                    __DRI_IMAGE_USE_SHARE |
+                                                    __DRI_IMAGE_USE_SCANOUT |
+                                                    __DRI_IMAGE_USE_BACKBUFFER,
+                                                    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 |
-                                        __DRI_IMAGE_USE_BACKBUFFER,
-                                        buffer);
+        draw->ext->image->createImage(draw->dri_screen,
+                                      width, height, format,
+                                      __DRI_IMAGE_USE_SHARE |
+                                      __DRI_IMAGE_USE_LINEAR |
+                                      __DRI_IMAGE_USE_BACKBUFFER,
+                                      buffer);
       pixmap_buffer = buffer->linear_buffer;
 
       if (!buffer->linear_buffer)
@@ -892,14 +892,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,
@@ -930,10 +930,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:
@@ -1082,19 +1082,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;
 }

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to