glamor: Pass depth to glamor_pm_is_solid and glamor_set_planemask

Instead of passing the destination drawable, just pass the depth, as
the underlying functions need only that to check whether the planemask
is going to work.

This API change will allow higher level functions to not need the
destination pixmap.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Keith Packard 2014-10-13 12:32:27 -07:00
commit 2bf34fe8d9
7 changed files with 16 additions and 17 deletions

View file

@ -49,7 +49,7 @@ glamor_put_image_gl(DrawablePtr drawable, GCPtr gc, int depth, int x, int y,
if (gc->alu != GXcopy)
goto bail;
if (!glamor_pm_is_solid(&pixmap->drawable, gc->planemask))
if (!glamor_pm_is_solid(gc->depth, gc->planemask))
goto bail;
if (format == XYPixmap && drawable->depth == 1 && leftPad == 0)
@ -116,7 +116,7 @@ glamor_get_image_gl(DrawablePtr drawable, int x, int y, int w, int h,
if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv))
goto bail;
if (format != ZPixmap || !glamor_pm_is_solid(drawable, plane_mask))
if (format != ZPixmap || !glamor_pm_is_solid(drawable->depth, plane_mask))
goto bail;
glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y);