v0.7.5b: fixed new font failing to work on devices with Mali gpus

This commit is contained in:
Evan Debenham 2019-10-13 20:53:49 -04:00
parent adaca2531e
commit f6efadd778

View File

@ -276,8 +276,13 @@ public class AndroidPlatformSupport extends PlatformSupport {
if (SCFontGenerator != null) fonts.put(SCFontGenerator, SCFonts); if (SCFontGenerator != null) fonts.put(SCFontGenerator, SCFonts);
if (JPFontGenerator != null) fonts.put(JPFontGenerator, JPFonts); if (JPFontGenerator != null) fonts.put(JPFontGenerator, JPFonts);
//use RGBA4444 to save memory. Extra precision isn't needed here. String renderer = Gdx.gl.glGetString(Gdx.gl.GL_RENDERER);
packer = new PixmapPacker(pageSize, pageSize, Pixmap.Format.RGBA4444, 1, false); //want to use RGBA4444 to save memory if we can, but this causes problems on Mali gpus
if (renderer.contains("Mali") || renderer.contains("mali")) {
packer = new PixmapPacker(pageSize, pageSize, Pixmap.Format.RGBA8888, 1, false);
} else {
packer = new PixmapPacker(pageSize, pageSize, Pixmap.Format.RGBA4444, 1, false);
}
} }
@Override @Override