gpu: Make the device queryable from the cache

That's needed in cached subclasses during destruction, when they want to
destroy system resources.
This commit is contained in:
Benjamin Otte 2024-07-22 01:18:44 +02:00
parent 5e027ae5d9
commit 762b981dfe
2 changed files with 7 additions and 0 deletions

View File

@ -785,6 +785,12 @@ static const GskGpuCachedClass GSK_GPU_CACHED_GLYPH_CLASS =
/* }}} */
/* {{{ GskGpuCache */
GskGpuDevice *
gsk_gpu_cache_get_device (GskGpuCache *self)
{
return self->device;
}
/*
* gsk_gpu_cache_set_time:
* @self: a `GskGpuCache`

View File

@ -57,6 +57,7 @@ GskGpuCache * gsk_gpu_cache_new (GskGpuD
gpointer gsk_gpu_cached_new (GskGpuCache *cache,
const GskGpuCachedClass *class);
GskGpuDevice * gsk_gpu_cache_get_device (GskGpuCache *self);
void gsk_gpu_cache_set_time (GskGpuCache *self,
gint64 timestamp);