summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <daenzer@vmware.com>2009-08-31 18:41:54 +0200
committerMichel Dänzer <daenzer@vmware.com>2009-08-31 18:41:54 +0200
commit40e3148a81f93f590c7400b00a6c2d536a2258b0 (patch)
tree3d73fb54ec78dafd156f5e07af14a6559ff40a0d /src
parent366efd8c4b69e8ec1b6f4ec5ba5df54e6574f8f1 (diff)
st/xorg: Simplify EXA ModifyPixmapHeader hook for pPixmap != NULL.
Just let the upper layers handle it.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_exa.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c
index 7b607cb798..5d205dd823 100644
--- a/src/gallium/state_trackers/xorg/xorg_exa.c
+++ b/src/gallium/state_trackers/xorg/xorg_exa.c
@@ -427,7 +427,7 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
modesettingPtr ms = modesettingPTR(pScrn);
struct exa_context *exa = ms->exa;
- if (!priv)
+ if (!priv || pPixData)
return FALSE;
if (depth <= 0)
@@ -476,24 +476,11 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
}
#ifdef DRM_MODE_FEATURE_DIRTYFB
- if (!priv->tex) {
- if (pPixData)
- pPixmap->devPrivate.ptr = pPixData;
- else
+ if (!priv->tex)
pPixmap->devPrivate.ptr = xalloc(pPixmap->drawable.height * pPixmap->devKind);
- } else
#endif
- if (pPixData) {
- struct pipe_transfer *transfer =
- exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0,
- PIPE_TRANSFER_WRITE,
- 0, 0, width, height);
- util_copy_rect(exa->scrn->transfer_map(exa->scrn, transfer),
- &priv->tex->block, transfer->stride, 0, 0,
- width, height, pPixData, pPixmap->devKind, 0, 0);
- exa->scrn->transfer_unmap(exa->scrn, transfer);
- exa->scrn->tex_transfer_destroy(transfer);
- } else if (priv->tex && pPixmap->devPrivate.ptr) {
+
+ if (priv->tex && pPixmap->devPrivate.ptr) {
struct pipe_transfer *transfer;
if (priv->map_count != 0)