Commit 47e86eea authored by Zhigang Gong's avatar Zhigang Gong Committed by Eric Anholt

Fallback if the pixmap is drm only.

Glamor can't do anything with a drm only pixmap.
Signed-off-by: default avatarZhigang Gong <zhigang.gong@linux.intel.com>
parent e3d16c9e
...@@ -517,7 +517,6 @@ glamor_composite_with_copy(CARD8 op, ...@@ -517,7 +517,6 @@ glamor_composite_with_copy(CARD8 op,
0, 0, x_dest, y_dest, width, height)) 0, 0, x_dest, y_dest, width, height))
return TRUE; return TRUE;
ret = TRUE; ret = TRUE;
ErrorF("width %d height %d \n", width, height);
if (!glamor_copy_n_to_n_nf(source->pDrawable, if (!glamor_copy_n_to_n_nf(source->pDrawable,
dest->pDrawable, NULL, dest->pDrawable, NULL,
REGION_RECTS(&region), REGION_RECTS(&region),
...@@ -946,6 +945,7 @@ glamor_composite_with_shader(CARD8 op, ...@@ -946,6 +945,7 @@ glamor_composite_with_shader(CARD8 op,
if (mask_status == GLAMOR_UPLOAD_PENDING) { if (mask_status == GLAMOR_UPLOAD_PENDING) {
mask_status = mask_status =
glamor_upload_picture_to_texture(mask); glamor_upload_picture_to_texture(mask);
if (mask_status != GLAMOR_UPLOAD_DONE) { if (mask_status != GLAMOR_UPLOAD_DONE) {
glamor_fallback glamor_fallback
("Failed to upload mask texture.\n"); ("Failed to upload mask texture.\n");
...@@ -1230,13 +1230,15 @@ _glamor_composite(CARD8 op, ...@@ -1230,13 +1230,15 @@ _glamor_composite(CARD8 op,
glamor_get_drawable_pixmap(source->pDrawable); glamor_get_drawable_pixmap(source->pDrawable);
source_pixmap_priv = source_pixmap_priv =
glamor_get_pixmap_private(source_pixmap); glamor_get_pixmap_private(source_pixmap);
if (!source_pixmap_priv) goto fail; if (!source_pixmap_priv || source_pixmap_priv->type == GLAMOR_DRM_ONLY)
goto fail;
} }
if (mask && mask->pDrawable) { if (mask && mask->pDrawable) {
mask_pixmap = glamor_get_drawable_pixmap(mask->pDrawable); mask_pixmap = glamor_get_drawable_pixmap(mask->pDrawable);
mask_pixmap_priv = glamor_get_pixmap_private(mask_pixmap); mask_pixmap_priv = glamor_get_pixmap_private(mask_pixmap);
if (!mask_pixmap_priv) goto fail; if (!mask_pixmap_priv || mask_pixmap_priv->type == GLAMOR_DRM_ONLY)
goto fail;
} }
if ((!source->pDrawable if ((!source->pDrawable
&& (source->pSourcePict->type != SourcePictTypeSolidFill)) && (source->pSourcePict->type != SourcePictTypeSolidFill))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment