gpu: Improve periodic cache debug message

I was watching the log in my terminal and nothing happened.
And I wasn't sure if that was because nothing was printed or because the
same thing was printed every few seconds.

Fix that by printing a timestamp, so that in a few seconds something
else will be printed.
This commit is contained in:
Benjamin Otte
2024-07-03 20:35:24 +02:00
parent eae7ee6c25
commit 9c249fefc3

View File

@@ -60,10 +60,12 @@ cache_gc_cb (gpointer data)
{
GskGpuDevice *self = data;
GskGpuDevicePrivate *priv = gsk_gpu_device_get_instance_private (self);
gint64 timestamp;
GSK_DEBUG (GLYPH_CACHE, "Periodic GC");
timestamp = g_get_monotonic_time ();
GSK_DEBUG (GLYPH_CACHE, "Periodic GC (timestamp %lld)", (long long) timestamp);
if (gsk_gpu_device_gc (self, g_get_monotonic_time ()))
if (gsk_gpu_device_gc (self, timestamp))
{
priv->cache_gc_source = 0;
return G_SOURCE_REMOVE;