Skip to content

Commit

Permalink
Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite
Browse files Browse the repository at this point in the history
There is no pixmap associated with source-only pictures.

Fixes Xephyr -fakexa crashing on startup.

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  • Loading branch information
Michel Dänzer authored and whot committed Mar 23, 2017
1 parent fdc79fe commit eb2cf11
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions hw/kdrive/ephyr/ephyr_draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,8 @@ ephyrPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture,
EphyrFakexaPriv *fakexa = scrpriv->fakexa;

ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
if (pSrc != NULL)
ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
if (pMask != NULL)
ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);

Expand Down Expand Up @@ -298,7 +299,8 @@ ephyrDoneComposite(PixmapPtr pDst)

if (fakexa->pMask != NULL)
ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK);
ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
if (fakexa->pSrc != NULL)
ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST);
}

Expand Down

0 comments on commit eb2cf11

Please sign in to comment.