[cairo] [PATCH 33/71] drm: fix signature of bo backend 's release callback

Enrico Weigelt, metux IT consult enrico.weigelt at gr13.net
Mon Apr 17 16:57:12 UTC 2017


Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
---
 src/drm/cairo-drm-intel.c   | 4 ++--
 src/drm/cairo-drm-private.h | 7 ++++---
 src/drm/cairo-drm-radeon.c  | 4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/drm/cairo-drm-intel.c b/src/drm/cairo-drm-intel.c
index be1e5c6ee..6c4187771 100644
--- a/src/drm/cairo-drm-intel.c
+++ b/src/drm/cairo-drm-intel.c
@@ -491,7 +491,7 @@ FAIL:
 }
 
 static void
-intel_bo_release (void *_dev, void *_bo)
+intel_bo_release (cairo_drm_device_t *_dev, cairo_drm_bo_t *_bo)
 {
     intel_device_t *device = _cairo_drm_device_cast_intel(_dev);
     intel_bo_t *bo = _cairo_drm_bo_cast_intel(_bo);
@@ -502,7 +502,7 @@ intel_bo_release (void *_dev, void *_bo)
     assert (bo->exec == NULL);
     assert (cairo_list_is_empty (&bo->cache_list));
 
-    _cairo_drm_bo_close (&device->base, &bo->base);
+    _cairo_drm_bo_close (_dev, _bo);
     _cairo_freepool_free (&device->bo_pool, bo);
 }
 
diff --git a/src/drm/cairo-drm-private.h b/src/drm/cairo-drm-private.h
index a384a5153..5c4b74f8b 100644
--- a/src/drm/cairo-drm-private.h
+++ b/src/drm/cairo-drm-private.h
@@ -47,6 +47,7 @@
 #include "cairo-surface-private.h"
 
 typedef struct _cairo_drm_device cairo_drm_device_t;
+typedef struct _cairo_drm_bo cairo_drm_bo_t;
 
 typedef cairo_drm_device_t *
 (*cairo_drm_device_create_func_t) (int fd,
@@ -88,7 +89,7 @@ typedef cairo_surface_t *
 (*cairo_drm_surface_map_to_image_func_t) (void *surface);
 
 typedef struct _cairo_drm_bo_backend {
-    void (*release) (void *device, void *bo);
+    void (*release) (cairo_drm_device_t *device, cairo_drm_bo_t *bo);
 } cairo_drm_bo_backend_t;
 
 typedef struct _cairo_drm_device_backend {
@@ -106,12 +107,12 @@ typedef struct _cairo_drm_surface_backend {
     cairo_drm_surface_map_to_image_func_t map_to_image;
 } cairo_drm_surface_backend_t;
 
-typedef struct _cairo_drm_bo {
+struct _cairo_drm_bo {
     cairo_reference_count_t ref_count;
     uint32_t name;
     uint32_t handle;
     uint32_t size;
-} cairo_drm_bo_t;
+};
 
 struct _cairo_drm_device {
     cairo_device_t base;
diff --git a/src/drm/cairo-drm-radeon.c b/src/drm/cairo-drm-radeon.c
index 842994dd9..94bc2951f 100644
--- a/src/drm/cairo-drm-radeon.c
+++ b/src/drm/cairo-drm-radeon.c
@@ -253,9 +253,9 @@ radeon_bo_create_for_name (radeon_device_t *device,
 }
 
 static void
-radeon_bo_release (void *_dev, void *_bo)
+radeon_bo_release (cairo_drm_device_t *_dev, cairo_drm_bo_t *_bo)
 {
-    radeon_device_t *device = _cairo_device_cast_radeon(_dev);
+    radeon_device_t *device = _cairo_drm_device_cast_radeon(_dev);
     radeon_bo_t *bo = _cairo_drm_bo_cast_radeon(_bo);
 
     _cairo_drm_bo_close (&device->base, &bo->base);
-- 
2.11.0.rc0.7.gbe5a750



More information about the cairo mailing list