drm-intel: Unmap a full glyph cache.

When we swap a full glyph cache for a fresh one, be sure to unmap the
old one prior to release.
This commit is contained in:
Chris Wilson 2010-01-28 13:23:39 +00:00
parent 78cd947120
commit 5f0a0088af
2 changed files with 4 additions and 1 deletions

View file

@ -461,8 +461,8 @@ i915_surface_glyphs (void *abstract_surface,
if (unlikely (status))
goto FINISH;
}
glyph = intel_glyph_pin (scaled_glyph->surface_private);
glyph = intel_glyph_pin (scaled_glyph->surface_private);
if (glyph->cache->buffer.bo != last_bo) {
intel_buffer_cache_t *cache = glyph->cache;

View file

@ -1182,6 +1182,9 @@ intel_get_glyph (intel_device_t *device,
assert (cache->buffer.bo->exec != NULL);
if (cache->buffer.bo->virtual != NULL)
intel_bo_unmap (cache->buffer.bo);
_cairo_rtree_reset (&cache->rtree);
intel_bo_destroy (device, cache->buffer.bo);
cache->buffer.bo = NULL;