summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Crouse <jordan.crouse@amd.com>2007-09-28 09:05:56 -0600
committerJordan Crouse <jordan.crouse@amd.com>2007-10-01 09:15:08 -0600
commit5833df9f71af8253f02a360c1b0e5e36ba2e4910 (patch)
treef7a90b1066b7b0fd3443e650eb9fe302fb3a0ece
parentdfe2ab1ea3c1a66952b6d38e436a064d677e5fba (diff)
[XORG] Fix video downscaling
When downscaling the window, apparently the clip region doesn't change (not sure why), so we didn't get the message to re-init the video. This will make the re-init process happen on both the clip region changing and the width/height changing.
-rw-r--r--src/amd_lx_video.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/amd_lx_video.c b/src/amd_lx_video.c
index e2e3fe3..cd1190c 100644
--- a/src/amd_lx_video.c
+++ b/src/amd_lx_video.c
@@ -100,6 +100,7 @@ typedef struct
CARD32 videoStatus;
Time offTime;
Time freeTime;
+ short pwidth, pheight;
} GeodePortPrivRec, *GeodePortPrivPtr;
#define GET_PORT_PRIVATE(pScrni) \
@@ -528,7 +529,8 @@ LXPutImage(ScrnInfoPtr pScrni,
break;
}
- if (!RegionsEqual(&pPriv->clip, clipBoxes)) {
+ if (!RegionsEqual(&pPriv->clip, clipBoxes) ||
+ (drawW != pPriv->pwidth || drawH != pPriv->pheight)) {
REGION_COPY(pScrni->pScreen, &pPriv->clip, clipBoxes);
if (pPriv->colorKeyMode == 0) {
@@ -537,8 +539,10 @@ LXPutImage(ScrnInfoPtr pScrni,
LXDisplayVideo(pScrni, id, width, height, &dstBox,
srcW, srcH, drawW, drawH);
+ pPriv->pwidth = drawW;
+ pPriv->pheight = drawH;
}
-
+
pPriv->videoStatus = CLIENT_VIDEO_ON;
pGeode->OverlayON = TRUE;
@@ -746,6 +750,8 @@ LXSetupImageVideo(ScreenPtr pScrn)
pPriv->colorKey = pGeode->videoKey;
pPriv->colorKeyMode = 0;
pPriv->videoStatus = 0;
+ pPriv->pwidth = 0;
+ pPriv->pheight = 0;
REGION_NULL(pScrn, &pPriv->clip);