Merge remote-tracking branch 'anholt/glamor-next'
This commit is contained in:
commit
0a625adeec
|
@ -160,7 +160,9 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
|
||||||
return NullPixmap;
|
return NullPixmap;
|
||||||
|
|
||||||
if ((usage == GLAMOR_CREATE_PIXMAP_CPU
|
if ((usage == GLAMOR_CREATE_PIXMAP_CPU
|
||||||
|| (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE && w <= 64 && h <= 64)
|
|| (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE &&
|
||||||
|
w <= glamor_priv->glyph_max_dim &&
|
||||||
|
h <= glamor_priv->glyph_max_dim)
|
||||||
|| (w == 0 && h == 0)
|
|| (w == 0 && h == 0)
|
||||||
|| !glamor_check_pixmap_fbo_depth(depth))
|
|| !glamor_check_pixmap_fbo_depth(depth))
|
||||||
|| (!GLAMOR_TEXTURED_LARGE_PIXMAP &&
|
|| (!GLAMOR_TEXTURED_LARGE_PIXMAP &&
|
||||||
|
|
|
@ -112,7 +112,8 @@ glamor_glyph_atlas_init(ScreenPtr screen, struct glamor_glyph_atlas *atlas)
|
||||||
PictFormatPtr format = atlas->format;
|
PictFormatPtr format = atlas->format;
|
||||||
|
|
||||||
atlas->atlas = glamor_create_pixmap(screen, glamor_priv->glyph_atlas_dim,
|
atlas->atlas = glamor_create_pixmap(screen, glamor_priv->glyph_atlas_dim,
|
||||||
glamor_priv->glyph_atlas_dim, format->depth, 0);
|
glamor_priv->glyph_atlas_dim, format->depth,
|
||||||
|
GLAMOR_CREATE_FBO_NO_FBO);
|
||||||
atlas->x = 0;
|
atlas->x = 0;
|
||||||
atlas->y = 0;
|
atlas->y = 0;
|
||||||
atlas->row_height = 0;
|
atlas->row_height = 0;
|
||||||
|
@ -265,9 +266,11 @@ glamor_glyphs_flush(CARD8 op, PicturePtr src, PicturePtr dst,
|
||||||
|
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
|
|
||||||
glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0);
|
if (glamor_glyph_use_130(glamor_priv)) {
|
||||||
|
glVertexAttribDivisor(GLAMOR_VERTEX_SOURCE, 0);
|
||||||
|
glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0);
|
||||||
|
}
|
||||||
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
|
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
|
||||||
glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0);
|
|
||||||
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
|
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
}
|
}
|
||||||
|
@ -331,8 +334,6 @@ glamor_composite_glyphs(CARD8 op,
|
||||||
ScreenPtr screen = drawable->pScreen;
|
ScreenPtr screen = drawable->pScreen;
|
||||||
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
|
||||||
glamor_program *prog = NULL;
|
glamor_program *prog = NULL;
|
||||||
PicturePtr glyph_pict = NULL;
|
|
||||||
DrawablePtr glyph_draw;
|
|
||||||
glamor_program_render *glyphs_program = &glamor_priv->glyphs_program;
|
glamor_program_render *glyphs_program = &glamor_priv->glyphs_program;
|
||||||
struct glamor_glyph_atlas *glyph_atlas = NULL;
|
struct glamor_glyph_atlas *glyph_atlas = NULL;
|
||||||
int x = 0, y = 0;
|
int x = 0, y = 0;
|
||||||
|
@ -360,11 +361,10 @@ glamor_composite_glyphs(CARD8 op,
|
||||||
/* Glyph not empty?
|
/* Glyph not empty?
|
||||||
*/
|
*/
|
||||||
if (glyph->info.width && glyph->info.height) {
|
if (glyph->info.width && glyph->info.height) {
|
||||||
glamor_pixmap_private *glyph_pix_priv;
|
PicturePtr glyph_pict = GlyphPicture(glyph)[screen_num];
|
||||||
|
DrawablePtr glyph_draw = glyph_pict->pDrawable;
|
||||||
glyph_pict = GlyphPicture(glyph)[screen_num];
|
glamor_pixmap_private *glyph_pix_priv =
|
||||||
glyph_draw = glyph_pict->pDrawable;
|
glamor_get_pixmap_private((PixmapPtr) glyph_draw);
|
||||||
glyph_pix_priv = glamor_get_pixmap_private((PixmapPtr) glyph_draw);
|
|
||||||
|
|
||||||
/* Need to draw with slow path?
|
/* Need to draw with slow path?
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue
Block a user