diff options
author | Alon Levy <alevy@redhat.com> | 2011-04-05 14:25:10 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-04-07 16:16:50 +0300 |
commit | fc314927bc48835e9030aae3f47546658fbc07f7 (patch) | |
tree | aeb891f54984499245febdc18bcdcc5aca7f638d | |
parent | d7bda9b6eaebb71bd3a4f62d4d86ee9f0b4f0bdd (diff) |
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).
-rw-r--r-- | display/res.c | 8 |
1 files changed, 2 insertions, 6 deletions
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)); |