From 12728d43f83e48db74470ec32d252967f8d46757 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sat, 15 Feb 2020 00:22:47 +0100 Subject: Revert "Fix T73763: Laggy with nodes Editor + International Fonts" This reverts commit a21f5ec56245f7f1fbede4aa3c140a582c3a6a1b. --- source/blender/blenfont/intern/blf_glyph.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/blenfont/intern/blf_glyph.c') diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c index ba464c76bd1..535366b78fa 100644 --- a/source/blender/blenfont/intern/blf_glyph.c +++ b/source/blender/blenfont/intern/blf_glyph.c @@ -265,9 +265,11 @@ static void blf_glyph_cache_texture(FontBLF *font, GlyphCacheBLF *gc) gc->p2_height = font->tex_size_max; } + unsigned char *pixels = MEM_callocN((size_t)gc->p2_width * (size_t)gc->p2_height, + "BLF texture init"); GPUTexture *tex = GPU_texture_create_nD( - gc->p2_width, gc->p2_height, 0, 2, NULL, GPU_R8, GPU_DATA_UNSIGNED_BYTE, 0, false, error); - + gc->p2_width, gc->p2_height, 0, 2, pixels, GPU_R8, GPU_DATA_UNSIGNED_BYTE, 0, false, error); + MEM_freeN(pixels); gc->textures[gc->texture_current] = tex; GPU_texture_bind(tex, 0); GPU_texture_wrap_mode(tex, false); -- cgit v1.2.3