[cairo] [PATCH v8 36/71] drm: fix signature of bo backend 's release callback
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Thu Jun 30 15:46:14 UTC 2016
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 be1e5c6..6c41877 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 a384a51..5c4b74f 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 842994d..94bc295 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.6.4.442.g545299f
More information about the cairo
mailing list