mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-26 21:12:25 +00:00
glamor: Pass pixmaps around to unifdef glamor_iformat_for_depth().
v2: Just pass in the PicturePtr to glamor_pict_format_is_compatible()
(suggestion by keithp)
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
f3f4fc7a65
commit
d63283860a
4 changed files with 21 additions and 22 deletions
|
|
@ -95,7 +95,7 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex)
|
|||
glamor_destroy_fbo(fbo);
|
||||
}
|
||||
|
||||
gl_iformat_for_depth(pixmap->drawable.depth, &format);
|
||||
format = gl_iformat_for_pixmap(pixmap);
|
||||
fbo = glamor_create_fbo_from_tex(glamor_priv, pixmap->drawable.width,
|
||||
pixmap->drawable.height, format, tex, 0);
|
||||
|
||||
|
|
@ -162,7 +162,7 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
|
|||
pixmap_priv->base.pixmap = pixmap;
|
||||
pixmap_priv->base.glamor_priv = glamor_priv;
|
||||
|
||||
gl_iformat_for_depth(depth, &format);
|
||||
format = gl_iformat_for_pixmap(pixmap);
|
||||
|
||||
pitch = (((w * pixmap->drawable.bitsPerPixel + 7) / 8) + 3) & ~3;
|
||||
screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, pitch, NULL);
|
||||
|
|
|
|||
Loading…
Reference in a new issue