xf86-video-intel: src/i915_render.c uxa/uxa-render.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon May 10 04:29:49 PDT 2010
src/i915_render.c | 8 ++++----
uxa/uxa-render.c | 51 +++++++++++++++++++++++++++++++++++++--------------
2 files changed, 41 insertions(+), 18 deletions(-)
New commits:
commit 0d4dd00aeafdd625ffe902e26e666b63a0842adc
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Mon May 10 12:10:09 2010 +0100
uxa,i915: Handle SourcePict through uxa_composite()
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/i915_render.c b/src/i915_render.c
index 25ad51c..98f8f4a 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -369,13 +369,13 @@ i915_prepare_composite(int op, PicturePtr source_picture,
PicturePtr mask_picture, PicturePtr dest_picture,
PixmapPtr source, PixmapPtr mask, PixmapPtr dest)
{
- ScrnInfoPtr scrn = xf86Screens[source_picture->pDrawable->pScreen->myNum];
+ ScrnInfoPtr scrn = xf86Screens[dest_picture->pDrawable->pScreen->myNum];
intel_screen_private *intel = intel_get_screen_private(scrn);
drm_intel_bo *bo_table[] = {
NULL, /* batch_bo */
- i830_get_pixmap_bo(source),
- mask ? i830_get_pixmap_bo(mask) : NULL,
i830_get_pixmap_bo(dest),
+ source ? i830_get_pixmap_bo(source) : NULL,
+ mask ? i830_get_pixmap_bo(mask) : NULL,
};
int tex_unit = 0;
@@ -465,7 +465,7 @@ i915_prepare_composite(int op, PicturePtr source_picture,
intel->i915_render_state.op = op;
- if(i830_uxa_pixmap_is_dirty(source) ||
+ if((source && i830_uxa_pixmap_is_dirty(source)) ||
(mask && i830_uxa_pixmap_is_dirty(mask)))
intel_batch_emit_flush(scrn);
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index ddee172..849a646 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -708,8 +708,13 @@ uxa_acquire_source(ScreenPtr pScreen,
if (uxa_screen->info->check_composite_texture &&
uxa_screen->info->check_composite_texture(pScreen, pPict)) {
- *out_x = x + pPict->pDrawable->x;
- *out_y = y + pPict->pDrawable->y;
+ if (pPict->pDrawable) {
+ *out_x = x + pPict->pDrawable->x;
+ *out_y = y + pPict->pDrawable->y;
+ } else {
+ *out_x = x;
+ *out_y = y;
+ }
return pPict;
}
@@ -930,22 +935,40 @@ uxa_try_driver_composite(CARD8 op,
return 1;
}
- pSrcPix = uxa_get_offscreen_pixmap(localSrc->pDrawable,
- &src_off_x, &src_off_y);
+ if (localSrc->pDrawable) {
+ pSrcPix = uxa_get_offscreen_pixmap(localSrc->pDrawable,
+ &src_off_x, &src_off_y);
+ if (!pSrcPix) {
+ REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
- if (localMask)
- pMaskPix = uxa_get_offscreen_pixmap(localMask->pDrawable,
- &mask_off_x, &mask_off_y);
+ if (localSrc != pSrc)
+ FreePicture(localSrc, 0);
+ if (localMask && localMask != pMask)
+ FreePicture(localMask, 0);
- if (!pSrcPix || (localMask && !pMaskPix)) {
- REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
+ return 0;
+ }
+ } else {
+ pSrcPix = NULL;
+ }
- if (localSrc != pSrc)
- FreePicture(localSrc, 0);
- if (localMask && localMask != pMask)
- FreePicture(localMask, 0);
+ if (localMask) {
+ if (localMask->pDrawable) {
+ pMaskPix = uxa_get_offscreen_pixmap(localMask->pDrawable,
+ &mask_off_x, &mask_off_y);
+ if (!pMaskPix) {
+ REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
- return 0;
+ if (localSrc != pSrc)
+ FreePicture(localSrc, 0);
+ if (localMask && localMask != pMask)
+ FreePicture(localMask, 0);
+
+ return 0;
+ }
+ } else {
+ pMaskPix = NULL;
+ }
}
REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y);
More information about the xorg-commit
mailing list