[Spice-commits] display/res.c
Alon Levy
alon at kemper.freedesktop.org
Thu Apr 7 06:17:04 PDT 2011
display/res.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
New commits:
commit fc314927bc48835e9030aae3f47546658fbc07f7
Author: Alon Levy <alevy at redhat.com>
Date: Tue Apr 5 14:25:10 2011 +0300
display/res: fix ie9 rendering
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).
diff --git a/display/res.c b/display/res.c
index ccbb110..f8f9c71 100644
--- a/display/res.c
+++ b/display/res.c
@@ -1984,15 +1984,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));
More information about the Spice-commits
mailing list