glamor: Fix rendering when core font texture allocation fails.
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
a6b05d10da
commit
ff8ef975df
|
@ -127,8 +127,13 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
|
|||
}
|
||||
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
||||
|
||||
glamor_priv->suppress_gl_out_of_memory_logging = true;
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8UI, overall_width, overall_height,
|
||||
0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, bits);
|
||||
glamor_priv->suppress_gl_out_of_memory_logging = false;
|
||||
if (glGetError() == GL_OUT_OF_MEMORY)
|
||||
return NULL;
|
||||
|
||||
free(bits);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user