From 3f7fcb8599f956cc31ea2fa6982c4b3036524bb2 Mon Sep 17 00:00:00 2001 From: Nathan Sweet Date: Fri, 10 May 2024 17:26:07 -0400 Subject: [PATCH] BitmapFontCache, set low defaults for layouts and pooledLayouts. Most common usage doesn't need higher capacity. When it is needed, it'll grow. --- gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java b/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java index 8516a796c71..36596046062 100644 --- a/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java +++ b/gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFontCache.java @@ -38,8 +38,8 @@ public class BitmapFontCache { private final BitmapFont font; private boolean integer; - private final Array layouts = new Array(); - private final Array pooledLayouts = new Array(); + private final Array layouts = new Array(1); + private final Array pooledLayouts = new Array(0); private int glyphCount; private float x, y; private final Color color = new Color(1, 1, 1, 1);