summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 99ab80d)
raw | patch | inline | side by side (parent: 99ab80d)
author | Rob Clark <rob@ti.com> | |
Thu, 12 Apr 2012 22:38:39 +0000 (17:38 -0500) | ||
committer | Rob Clark <rob@ti.com> | |
Sat, 14 Apr 2012 01:12:53 +0000 (20:12 -0500) |
The dri2 client needs to know if we flipped or blit so it can
properly keep track of which buffer is the active back buffer.
properly keep track of which buffer is the active back buffer.
src/omap_dri2.c | patch | blob | history |
diff --git a/src/omap_dri2.c b/src/omap_dri2.c
index cd2147bbf34ae74ede07c5f2a91f0a0b56136b73..3cb94f14ba5c8fa5be39fb3596de114c6085f488 100644 (file)
--- a/src/omap_dri2.c
+++ b/src/omap_dri2.c
}
struct _OMAPDRISwapCmd {
+ int type;
ClientPtr client;
DrawablePtr pDraw;
DRI2BufferPtr pDstBuffer;
exchangebufs(cmd->pDraw, cmd->pSrcBuffer, cmd->pDstBuffer);
- DRI2SwapComplete(cmd->client, cmd->pDraw, 0, 0, 0, 0, cmd->func, cmd->data);
+ DRI2SwapComplete(cmd->client, cmd->pDraw, 0, 0, 0,
+ cmd->type, cmd->func, cmd->data);
free(cmd);
}
if (src->fb_id && dst->fb_id) {
DEBUG_MSG("can flip: %d -> %d", src->fb_id, dst->fb_id);
+ cmd->type = DRI2_FLIP_COMPLETE;
drmmode_page_flip(pDraw, src->fb_id, cmd);
} else if (canexchange(pDraw, pSrcBuffer, pDstBuffer)) {
/* we can get away w/ pointer swap.. yah! */
+ cmd->type = DRI2_EXCHANGE_COMPLETE;
OMAPDRI2SwapComplete(cmd);
} else {
/* fallback to blit: */
RegionRec region;
RegionInit(®ion, &box, 0);
OMAPDRI2CopyRegion(pDraw, ®ion, pDstBuffer, pSrcBuffer);
+ cmd->type = DRI2_BLIT_COMPLETE;
OMAPDRI2SwapComplete(cmd);
}