aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiyou Zhou <liyou.zhou@arm.com>2013-09-20 16:21:11 +0100
committerGerrit Code Review <gerrit@mpd-gerrit.cambridge.arm.com>2013-09-26 10:10:11 +0100
commitdcf32bda38ad7c25fd7f04bfe31f08dc6d645fb5 (patch)
tree1ff26c10eeaf5b1d3879eec8e0bb287a59deda54
parent6a1b31e69b4c2dea9626dbfd4a2498170cba5baa (diff)
downloadxf86-video-armsoc-dcf32bda38ad7c25fd7f04bfe31f08dc6d645fb5.tar.gz
Ensure the change of window flippablity before the first ScheduleSwap is always caught
The flippability of a window could changes between ARMSOCDRI2CreateBuffer and the first call of ARMSOCDRI2ScheduleSwap. This change is not picked up by ScheduleSwap and hence the buffer of the window is not forced to update. This change fixes that behavior. This fixes situations where: - Window gets mapped - Window resize nonfs->fs (or vice versa) - Window gets unredirected - Fullscreen window gets unobscured between eglCreateWindowSurface and eglSwapBuffers. Change-Id: Ica82814638d6fbd91f5db984692d5c52ac3f910e
-rw-r--r--src/armsoc_dri2.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/armsoc_dri2.c b/src/armsoc_dri2.c
index e5746d6..32572ee 100644
--- a/src/armsoc_dri2.c
+++ b/src/armsoc_dri2.c
@@ -221,7 +221,7 @@ ARMSOCDRI2CreateBuffer(DrawablePtr pDraw, unsigned int attachment,
DRIBUF(buf)->format = format;
DRIBUF(buf)->flags = 0;
buf->refcnt = 1;
- buf->previous_canflip = -1;
+ buf->previous_canflip = canflip(pDraw);
ret = armsoc_bo_get_name(bo, &DRIBUF(buf)->name);
if (ret) {
@@ -635,10 +635,8 @@ ARMSOCDRI2ScheduleSwap(ClientPtr client, DrawablePtr pDraw,
dst_fb_id = armsoc_bo_get_fb(dst_bo);
new_canflip = canflip(pDraw);
- if ((src->previous_canflip != -1 &&
- src->previous_canflip != new_canflip) ||
- (dst->previous_canflip != -1 &&
- dst->previous_canflip != new_canflip)) {
+ if ((src->previous_canflip != new_canflip) ||
+ (dst->previous_canflip != new_canflip)) {
/* The drawable has transitioned between being flippable and
* non-flippable or vice versa. Bump the serial number to force
* the DRI2 buffers to be re-allocated during the next frame so