winex11: remove unused field

Ričardas Barkauskas miegalius at gmail.com
Sun Nov 28 13:53:45 CST 2010


Makes Steam store page scrolling smoother.
Didn't find where this field would be used or what relevant difference
between fonts it would indicate for this caching.
Without it lots of fonts differing only by fields in this structure are
created in such a way that they get marked as unused almost immediately and
thus cache entries get reused fast.
Hacking to allow for much more generous cache growth resulted ~880 entries
(in short run) in font cache and it still managed not to find font in cache
quite often.
With this I didn't notice any such growth, no visual changes and no tests
complained (that don't complain usually).
Don't know what if any tests I could write for this (or more likely I simply
wouldn't be able :P).

Rčardas Barkauskas
REalm
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20101128/4ea4f357/attachment.htm>
-------------- next part --------------
From bedadd46089532da959fbe1e8e13e25a974aed5a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ri=C4=8Dardas=20Barkauskas?= <miegalius at gmail.com>
Date: Sun, 28 Nov 2010 21:30:22 +0200
Subject: winex11: remove unused field

---
 dlls/winex11.drv/xrender.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 4f900b2..7eab9e7 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -116,7 +116,6 @@ static WineXRenderFormat *default_format = NULL;
 typedef struct
 {
     LOGFONTW lf;
-    XFORM    xform;
     SIZE     devsize;  /* size in device coords */
     DWORD    hash;
 } LFANDSIZE;
@@ -639,7 +638,6 @@ static BOOL fontcmp(LFANDSIZE *p1, LFANDSIZE *p2)
 {
   if(p1->hash != p2->hash) return TRUE;
   if(memcmp(&p1->devsize, &p2->devsize, sizeof(p1->devsize))) return TRUE;
-  if(memcmp(&p1->xform, &p2->xform, sizeof(p1->xform))) return TRUE;
   if(memcmp(&p1->lf, &p2->lf, offsetof(LOGFONTW, lfFaceName))) return TRUE;
   return strcmpiW(p1->lf.lfFaceName, p2->lf.lfFaceName);
 }
@@ -1019,8 +1017,6 @@ static void lfsz_calc_hash(LFANDSIZE *plfsz)
 
   hash ^= plfsz->devsize.cx;
   hash ^= plfsz->devsize.cy;
-  for(i = 0, ptr = (DWORD*)&plfsz->xform; i < sizeof(XFORM)/sizeof(DWORD); i++, ptr++)
-    hash ^= *ptr;
   for(i = 0, ptr = (DWORD*)&plfsz->lf; i < 7; i++, ptr++)
     hash ^= *ptr;
   for(i = 0, ptr = (DWORD*)plfsz->lf.lfFaceName; i < LF_FACESIZE/2; i++, ptr++) {
@@ -1066,7 +1062,6 @@ BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont)
     lfsz.lf.lfWidth = abs( lfsz.lf.lfWidth );
     lfsz.devsize.cx = X11DRV_XWStoDS( physDev, lfsz.lf.lfWidth );
     lfsz.devsize.cy = X11DRV_YWStoDS( physDev, lfsz.lf.lfHeight );
-    GetWorldTransform( physDev->hdc, &lfsz.xform );
     lfsz_calc_hash(&lfsz);
 
     info = get_xrender_info(physDev);
-- 
1.7.2.3


More information about the wine-patches mailing list