[cairo] [PATCH v8 51/71] drm/intel: store scaled_glyph pointer in intel_glyph structure
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Thu Jun 30 15:46:29 UTC 2016
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 f31d96b..e643e82 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 f69ca34..609875a 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.6.4.442.g545299f
More information about the cairo
mailing list