[Spice-devel] [PATCH] qxl: add counter for stream_test
Izik Eidus
ieidus at redhat.com
Tue Feb 16 10:57:28 PST 2010
From ce5b4c5f95de9669b23c44857eea1bb9d0e44b27 Mon Sep 17 00:00:00 2001
From: Izik Eidus <ieidus at redhat.com>
Date: Tue, 16 Feb 2010 20:55:43 +0200
Subject: [PATCH] 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 at redhat.com>
---
display/qxldd.h | 1 +
display/rop.c | 9 ++++++++-
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;
--
1.6.6.1
More information about the Spice-devel
mailing list