[Spice-devel] [PATCH] display/res: fix ie9 rendering
Alon Levy
alevy at redhat.com
Wed Apr 6 07:41:12 PDT 2011
Internet Explorer 9 renders cursors and other things by reusing the same
SURFOBJ (i.e. surfobj->iUniq is constant) but changing the pallete.
We were wrongly ignoring the pallette's iUniq because the XO_TABLE flag
was not set. That flag should not be checked when calculating the key for
our cache. When that flag is ignored we correctly calculate a key that uses
both the surf->iUniq and the colortrans->iUniq together (64 bit from two 32
bit values).
---
display/res.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/display/res.c b/display/res.c
index ec5b900..51de54e 100644
--- a/display/res.c
+++ b/display/res.c
@@ -1966,15 +1966,11 @@ static BOOL CacheSizeTest(PDev *pdev, SURFOBJ *surf)
static _inline UINT64 get_unique(SURFOBJ *surf, XLATEOBJ *color_trans)
{
- int pallette;
- ULONG pallette_unique;
-
- pallette = color_trans && (color_trans->flXlate & XO_TABLE);
- pallette_unique = pallette ? color_trans->iUniq : 0;
+ ULONG pallette_unique = color_trans ? color_trans->iUniq : 0;
// NOTE: GDI sometimes gives many instances of the exactly same SURFOBJ (hsurf & iUniq),
// but with (fjBitmap & BMF_DONTCACHE). This opposed to what documented in the MSDN.
- if (!surf->iUniq || (surf->fjBitmap & BMF_DONTCACHE) || (pallette && !pallette_unique)) {
+ if (!surf->iUniq || (surf->fjBitmap & BMF_DONTCACHE) || !pallette_unique) {
return 0;
} else {
return (surf->iUniq | ((UINT64)pallette_unique << 32));
--
1.7.4.2
More information about the Spice-devel
mailing list