summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIzik Eidus <ieidus@redhat.com>2010-02-16 20:55:43 +0200
committerAlexander Larsson <alexl@redhat.com>2010-02-17 11:14:38 +0100
commitad5433a6b33ec59954601f0b7dbacc4609a4f754 (patch)
treefa64c0546809cd9fd1ce3eca9511251c72c38580
parenta7fb50d6c2395c32b236e42eac84b79be653c2cb (diff)
qxl: add counter for stream_test
It fix some issues with WAN and applications such as powerpoint that its slides can be wrongly thought as a video streaming in the driver and therefore not to get cached. Thanks Signed-off-by: Izik Eidus <ieidus@redhat.com>
-rw-r--r--display/qxldd.h1
-rw-r--r--display/rop.c9
2 files changed, 9 insertions, 1 deletions
diff --git a/display/qxldd.h b/display/qxldd.h
index a69c264..bff84d1 100644
--- a/display/qxldd.h
+++ b/display/qxldd.h
@@ -133,6 +133,7 @@ typedef struct UpdateTrace {
UINT32 last_time;
RECTL area;
HSURF hsurf;
+ UINT8 count;
} UpdateTrace;
typedef struct PMemSlot {
diff --git a/display/rop.c b/display/rop.c
index 746dd6a..83efdd3 100644
--- a/display/rop.c
+++ b/display/rop.c
@@ -484,11 +484,17 @@ static BOOL StreamTest(PDev *pdev, SURFOBJ *src_surf, XLATEOBJ *color_trans, REC
BOOL ret;
if (now != trace->last_time && now - trace->last_time < 1000 / 5) {
- ret = FALSE;
trace->last_time = now - 1; // asumong mm clock is active so delta t == 0 is
// imposibole. frocing delata t to be at least 1.
+ if (trace->count < 20) {
+ trace->count++;
+ ret = TRUE;
+ } else {
+ ret = FALSE;
+ }
} else {
trace->last_time = now;
+ trace->count = 0;
ret = TRUE;
}
RingRemove(pdev, (RingItem *)trace);
@@ -509,6 +515,7 @@ static BOOL StreamTest(PDev *pdev, SURFOBJ *src_surf, XLATEOBJ *color_trans, REC
} else {
trace->hsurf = NULL;
}
+ trace->count = 0;
RingAdd(pdev, ring, (RingItem *)trace);
return TRUE;