gsk/gl: ignore max_entry_size when zero
authorChristian Hergert <chergert@redhat.com>
Tue, 15 Mar 2022 22:53:47 +0000 (15:53 -0700)
committerChristian Hergert <chergert@redhat.com>
Fri, 18 Mar 2022 19:33:33 +0000 (12:33 -0700)
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

index 414190ea7d071f2c663ff2bf5c3f0c716a34750b..fadec60a0ca6bd8cc7865387e3df33d76b1fdde9 100644 (file)
@@ -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;