[cairo] [PATCH v8 43/71] drm: generalized *_surface_finish()
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Thu Jun 30 15:46:21 UTC 2016
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
---
src/drm/cairo-drm-private.h | 2 +-
src/drm/cairo-drm-radeon-surface.c | 10 +---------
src/drm/cairo-drm-surface.c | 6 ++++--
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/drm/cairo-drm-private.h b/src/drm/cairo-drm-private.h
index e975ad3..ca295d9 100644
--- a/src/drm/cairo-drm-private.h
+++ b/src/drm/cairo-drm-private.h
@@ -289,7 +289,7 @@ _cairo_drm_surface_init (cairo_drm_surface_t *surface,
int width, int height);
cairo_private cairo_status_t
-_cairo_drm_surface_finish (cairo_drm_surface_t *surface);
+_cairo_drm_surface_finish (void *surface);
cairo_private void
_cairo_drm_surface_get_font_options (void *abstract_surface,
diff --git a/src/drm/cairo-drm-radeon-surface.c b/src/drm/cairo-drm-radeon-surface.c
index d1d9fe6..c63288e 100644
--- a/src/drm/cairo-drm-radeon-surface.c
+++ b/src/drm/cairo-drm-radeon-surface.c
@@ -54,14 +54,6 @@ radeon_surface_create_similar (void *abstract_surface,
width, height);
}
-static cairo_status_t
-radeon_surface_finish (void *abstract_surface)
-{
- radeon_surface_t *surface = abstract_surface;
-
- return _cairo_drm_surface_finish (&surface->base);
-}
-
static void
radeon_surface_release_source_image (void *abstract_surface,
cairo_image_surface_t *image,
@@ -99,7 +91,7 @@ static const cairo_surface_backend_t radeon_surface_backend = {
.type = CAIRO_SURFACE_TYPE_DRM,
.create_context = _cairo_default_context_create,
.create_similar = radeon_surface_create_similar,
- .finish = radeon_surface_finish,
+ .finish = _cairo_drm_surface_finish,
.acquire_source_image = _cairo_drm_surface_acquire_source_image,
.release_source_image = radeon_surface_release_source_image,
.get_extents = _cairo_drm_surface_get_extents,
diff --git a/src/drm/cairo-drm-surface.c b/src/drm/cairo-drm-surface.c
index 47dccad..9c17a82 100644
--- a/src/drm/cairo-drm-surface.c
+++ b/src/drm/cairo-drm-surface.c
@@ -53,8 +53,10 @@ _cairo_drm_surface_init (cairo_drm_surface_t *surface,
}
cairo_status_t
-_cairo_drm_surface_finish (cairo_drm_surface_t *surface)
+_cairo_drm_surface_finish (void *abstract_surface)
{
+ cairo_drm_surface_t *surface = _cairo_surface_cast_drm (abstract_surface);
+
assert (surface->fallback == NULL);
if (surface->bo != NULL)
@@ -514,7 +516,7 @@ _cairo_drm_surface_acquire_source_image (void *abstract_surface,
cairo_image_surface_t **image_out,
void **image_extra)
{
- cairo_drm_surface_t *surface = _cairo_surface_cast_drm(abstract_surface);
+ cairo_drm_surface_t *surface = _cairo_surface_cast_drm (abstract_surface);
cairo_surface_t *image;
cairo_status_t status;
--
2.6.4.442.g545299f
More information about the cairo
mailing list