[gtk/matthiasc/for-main] gl: Don't leak big glyphs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-main] gl: Don't leak big glyphs
- Date: Tue, 5 Apr 2022 03:01:26 +0000 (UTC)
commit 48dbbbc0992bffa9d2167c37d8256d27fe4328a5
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Apr 3 20:25:22 2022 -0400
gl: Don't leak big glyphs
We were never resetting the accessed bit of
glyphs that are big enough to be stored individually,
so these would just accumulate and never be dropped.
gsk/gl/gskgltexturelibrary.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/gsk/gl/gskgltexturelibrary.c b/gsk/gl/gskgltexturelibrary.c
index 3e6463a848..9960985814 100644
--- a/gsk/gl/gskgltexturelibrary.c
+++ b/gsk/gl/gskgltexturelibrary.c
@@ -108,11 +108,17 @@ gsk_gl_texture_library_real_compact (GskGLTextureLibrary *self,
atlased++;
}
}
- else if (!entry->accessed)
+ else
{
- gsk_gl_driver_release_texture (self->driver, entry->texture);
- g_hash_table_iter_remove (&iter);
- dropped++;
+ if (!entry->accessed)
+ {
+ gsk_gl_driver_release_texture (self->driver, entry->texture);
+ g_hash_table_iter_remove (&iter);
+ dropped++;
+ }
+
+ if (periodic_scan)
+ entry->accessed = FALSE;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]