Add VRGB/VBGR render modes for subpixel aliasing as new FontOrientation to enable capabilities that are already in xrender.c:UploadGlyph and subsequently freetype.c:WineEngGetGlyphOutline

Clemens Fruhwirth clemens at endorphin.org
Tue Mar 16 16:03:40 CDT 2010


---
  dlls/winex11.drv/xrender.c |   25 +++++++++++++++----------
  include/winuser.h          |    6 ++++--
  2 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index 27e495b..23533a5 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -744,18 +744,23 @@ static AA_Type get_antialias_type( X11DRV_PDEVICE *physDev, BOOL subpixel, BOOL
          SystemParametersInfoW( SPI_GETFONTSMOOTHINGTYPE, 0,&font_smoothing_type, 0)&&
          font_smoothing_type == FE_FONTSMOOTHINGCLEARTYPE)
      {
-        if ( SystemParametersInfoW( SPI_GETFONTSMOOTHINGORIENTATION, 0,
-&font_smoothing_orientation, 0)&&
-             font_smoothing_orientation == FE_FONTSMOOTHINGORIENTATIONBGR)
+        ret = AA_RGB;
+        if ( SystemParametersInfoW( SPI_GETFONTSMOOTHINGORIENTATION, 0,
+&font_smoothing_orientation, 0))
          {
-            ret = AA_BGR;
+            switch (font_smoothing_orientation)
+            {
+                case FE_FONTSMOOTHINGORIENTATIONBGR:
+                    ret = AA_BGR;
+                    break;
+                case FE_FONTSMOOTHINGORIENTATIONVRGB:
+                    ret = AA_VRGB;
+                    break;
+                case FE_FONTSMOOTHINGORIENTATIONVBGR:
+                    ret = AA_VBGR;
+                    break;
+            }
          }
-        else
-            ret = AA_RGB;
-        /*FIXME
-          If the monitor is in portrait mode, ClearType is disabled in the MS Windows (MSDN).
-          But, Wine's subpixel rendering can support the portrait mode.
-         */
      }
      else if (!hinter || !get_gasp_flags(physDev,&flags) || flags&  GASP_DOGRAY)
          ret = AA_Grey;
diff --git a/include/winuser.h b/include/winuser.h
index 1a0ea5a..63ef183 100644
--- a/include/winuser.h
+++ b/include/winuser.h
@@ -3090,8 +3090,10 @@ typedef struct tagCBTACTIVATESTRUCT
  #define FE_FONTSMOOTHINGCLEARTYPE      0x0002
  #define FE_FONTSMOOTHINGDOCKING        0x8000

-#define FE_FONTSMOOTHINGORIENTATIONBGR 0x0000
-#define FE_FONTSMOOTHINGORIENTATIONRGB 0x0001
+#define FE_FONTSMOOTHINGORIENTATIONBGR  0x0000
+#define FE_FONTSMOOTHINGORIENTATIONRGB  0x0001
+#define FE_FONTSMOOTHINGORIENTATIONVBGR 0x0002
+#define FE_FONTSMOOTHINGORIENTATIONVRGB 0x0003

  #define SETWALLPAPER_DEFAULT           ((LPWSTR)-1)

-- 
1.7.0.2




More information about the wine-patches mailing list