/* Return value: CAIRO_STATUS_SUCCESS if successful or CAIRO_STATUS_NO_MEMORY if insufficient memory is available.  */
cairo_status_t _cairo_cache_insert(cairo_cache_t *cache, cairo_cache_entry_t *entry)
/* Return value: CAIRO_STATUS_SUCCESS if successful or CAIRO_STATUS_NO_MEMORY if insufficient memory is available.  */
cairo_status_t _cairo_cache_insert(cairo_cache_t *cache, cairo_cache_entry_t *entry)
{
    cairo_status_t status;
    if (entry->size && ! cache->freeze_count)
	_cairo_cache_shrink_to_accommodate (cache, entry->size);
    status = _cairo_hash_table_insert (cache->hash_table,
				       (cairo_hash_entry_t *) entry);
    if (unlikely (status))
	return status;
    cache->size += entry->size;
    return CAIRO_STATUS_SUCCESS;
}