[gtk/wip/chergert/gsk-gl-texture-library: 3/11] gsk/gl: ignore max_entry_size when zero
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/gsk-gl-texture-library: 3/11] gsk/gl: ignore max_entry_size when zero
- Date: Fri, 18 Mar 2022 21:56:16 +0000 (UTC)
commit 7062411bad6e04311d0486d747ebba58643986e3
Author: Christian Hergert <chergert redhat com>
Date: Tue Mar 15 15:53:47 2022 -0700
gsk/gl: ignore max_entry_size when zero
If the max_entry_size is zero, then assume we can add anything to the
atlas. This allows for situations where we might be uploading an arc list
to the atlas instead of pixel data for GPU font rendering.
gsk/gl/gskgltexturelibrary.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gl/gskgltexturelibrary.c b/gsk/gl/gskgltexturelibrary.c
index 414190ea7d..fadec60a0c 100644
--- a/gsk/gl/gskgltexturelibrary.c
+++ b/gsk/gl/gskgltexturelibrary.c
@@ -381,7 +381,9 @@ gsk_gl_texture_library_pack (GskGLTextureLibrary *self,
*out_packed_x = 0;
*out_packed_y = 0;
}
- else if (width <= self->max_entry_size && height <= self->max_entry_size)
+ else if (self->max_entry_size == 0 ||
+ (width <= self->max_entry_size &&
+ height <= self->max_entry_size))
{
int packed_x;
int packed_y;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]