[cairo] [PATCH 48/71] drm/intel: store scaled_glyph pointer in intel_glyph structure
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Mon Apr 17 16:57:27 UTC 2017
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
---
src/drm/cairo-drm-intel-private.h | 1 +
src/drm/cairo-drm-intel.c | 6 ++++--
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/drm/cairo-drm-intel-private.h b/src/drm/cairo-drm-intel-private.h
index f31d96bfa..e643e82b7 100644
--- a/src/drm/cairo-drm-intel-private.h
+++ b/src/drm/cairo-drm-intel-private.h
@@ -159,6 +159,7 @@ typedef struct _intel_buffer_cache {
typedef struct _intel_glyph {
cairo_rtree_node_t node;
+ cairo_scaled_glyph_t *glyph;
intel_buffer_cache_t *cache;
void **owner;
float texcoord[3];
diff --git a/src/drm/cairo-drm-intel.c b/src/drm/cairo-drm-intel.c
index f69ca342e..609875a0a 100644
--- a/src/drm/cairo-drm-intel.c
+++ b/src/drm/cairo-drm-intel.c
@@ -876,8 +876,11 @@ intel_glyph_cache_add_glyph (intel_device_t *device,
scaled_glyph->surface_private = node;
glyph_private= (intel_glyph_t *) node;
- glyph_private->node.owner = &scaled_glyph->surface_private;
glyph_private->cache = cache;
+ glyph_private->glyph = scaled_glyph;
+
+ scaled_glyph->dev_private = glyph_private;
+ scaled_glyph->dev_private_key = cache;
/* compute tex coords: bottom-right, bottom-left, top-left */
sf_x = 1. / cache->buffer.width;
@@ -906,7 +909,6 @@ intel_scaled_glyph_fini (cairo_scaled_glyph_private_t *scaled_glyph_private,
intel_glyph_t *priv = scaled_glyph->surface_private;
/* XXX thread-safety? Probably ok due to the frozen scaled-font. */
- priv->node.owner = NULL;
if (! priv->node.pinned)
_cairo_rtree_node_remove (&priv->cache->rtree, &priv->node);
}
--
2.11.0.rc0.7.gbe5a750
More information about the cairo
mailing list