[cairo] [PATCH 21/71] drm: fixed surface backend ops vectors

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


The struct layout has changed, but the DRM backend(s) haven't been
updated yet.

Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
---
 src/drm/cairo-drm-i965-surface.c  | 47 ++++++++++++---------------------------
 src/drm/cairo-drm-intel-surface.c | 46 ++++++++++++--------------------------
 2 files changed, 28 insertions(+), 65 deletions(-)

diff --git a/src/drm/cairo-drm-i965-surface.c b/src/drm/cairo-drm-i965-surface.c
index 4bacdbf3d..c2bf80d4e 100644
--- a/src/drm/cairo-drm-i965-surface.c
+++ b/src/drm/cairo-drm-i965-surface.c
@@ -1493,39 +1493,20 @@ CLEANUP_BOXES:
 }
 
 static const cairo_surface_backend_t i965_surface_backend = {
-    CAIRO_SURFACE_TYPE_DRM,
-    _cairo_default_context_create,
-
-    i965_surface_create_similar,
-    i965_surface_finish,
-
-    NULL,
-    intel_surface_acquire_source_image,
-    intel_surface_release_source_image,
-
-    NULL, NULL, NULL,
-    NULL, /* composite */
-    NULL, /* fill */
-    NULL, /* trapezoids */
-    NULL, /* span */
-    NULL, /* check-span */
-
-    NULL, /* copy_page */
-    NULL, /* show_page */
-    _cairo_drm_surface_get_extents,
-    NULL, /* old-glyphs */
-    _cairo_drm_surface_get_font_options,
-
-    i965_surface_flush,
-    NULL, /* mark_dirty */
-    intel_scaled_font_fini,
-    intel_scaled_glyph_fini,
-
-    i965_surface_paint,
-    i965_surface_mask,
-    i965_surface_stroke,
-    i965_surface_fill,
-    i965_surface_glyphs,
+    .type			= CAIRO_SURFACE_TYPE_DRM,
+    .create_context		= _cairo_default_context_create,
+    .create_similar		= i965_surface_create_similar,
+    .finish			= i965_surface_finish,
+    .acquire_source_image	= intel_surface_acquire_source_image,
+    .release_source_image	= intel_surface_release_source_image,
+    .get_extents		= _cairo_drm_surface_get_extents,
+    .get_font_options		= _cairo_drm_surface_get_font_options,
+    .flush			= i965_surface_flush,
+    .paint			= i965_surface_paint,
+    .mask			= i965_surface_mask,
+    .stroke			= i965_surface_stroke,
+    .fill			= i965_surface_fill,
+    .show_glyphs		= i965_surface_glyphs
 };
 
 static void
diff --git a/src/drm/cairo-drm-intel-surface.c b/src/drm/cairo-drm-intel-surface.c
index 5e4dd357e..dd427bd8b 100644
--- a/src/drm/cairo-drm-intel-surface.c
+++ b/src/drm/cairo-drm-intel-surface.c
@@ -253,38 +253,20 @@ intel_surface_glyphs (void			*abstract_surface,
 }
 
 static const cairo_surface_backend_t intel_surface_backend = {
-    CAIRO_SURFACE_TYPE_DRM,
-    _cairo_default_context_create,
-
-    intel_surface_create_similar,
-    intel_surface_finish,
-
-    NULL,
-    intel_surface_acquire_source_image,
-    intel_surface_release_source_image,
-
-    NULL, NULL, NULL,
-    NULL, /* composite */
-    NULL, /* fill */
-    NULL, /* trapezoids */
-    NULL, /* span */
-    NULL, /* check-span */
-
-    NULL, /* copy_page */
-    NULL, /* show_page */
-    _cairo_drm_surface_get_extents,
-    NULL, /* old-glyphs */
-    _cairo_drm_surface_get_font_options,
-
-    intel_surface_flush,
-    NULL, /* mark dirty */
-    NULL, NULL, /* font/glyph fini */
-
-    intel_surface_paint,
-    intel_surface_mask,
-    intel_surface_stroke,
-    intel_surface_fill,
-    intel_surface_glyphs,
+    .type			= CAIRO_SURFACE_TYPE_DRM,
+    .create_context		= _cairo_default_context_create,
+    .create_similar		= intel_surface_create_similar,
+    .finish			= intel_surface_finish,
+    .acquire_source_image	= intel_surface_acquire_source_image,
+    .release_source_image	= intel_surface_release_source_image,
+    .get_extents		= _cairo_drm_surface_get_extents,
+    .get_font_options		= _cairo_drm_surface_get_font_options,
+    .flush			= intel_surface_flush,
+    .paint			= intel_surface_paint,
+    .mask			= intel_surface_mask,
+    .stroke			= intel_surface_stroke,
+    .fill			= intel_surface_fill,
+    .show_glyphs		= intel_surface_glyphs,
 };
 
 void
-- 
2.11.0.rc0.7.gbe5a750



More information about the cairo mailing list