mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 21:00:03 +01:00
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
1 changed files with 5 additions and 0 deletions
|
|
@ -127,8 +127,13 @@ glamor_font_get(ScreenPtr screen, FontPtr font)
|
||||||
}
|
}
|
||||||
|
|
||||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
|
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,
|
glTexImage2D(GL_TEXTURE_2D, 0, GL_R8UI, overall_width, overall_height,
|
||||||
0, GL_RED_INTEGER, GL_UNSIGNED_BYTE, bits);
|
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);
|
free(bits);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue