rev 14073 - in trunk/packages/qt4-x11/debian: . patches

Fathi Boudra fabo at alioth.debian.org
Mon Mar 16 16:34:23 UTC 2009


Author: fabo
Date: 2009-03-16 16:34:22 +0000 (Mon, 16 Mar 2009)
New Revision: 14073

Added:
   trunk/packages/qt4-x11/debian/patches/0278-X11-Use-legacy-LCD-filtering-if-specified-in-font-c.diff
Removed:
   trunk/packages/qt4-x11/debian/patches/0277-remove-blurrying-glyph.diff
Modified:
   trunk/packages/qt4-x11/debian/changelog
   trunk/packages/qt4-x11/debian/patches/10_config_tests_fixes.diff
   trunk/packages/qt4-x11/debian/patches/series
Log:
Add new patch to fix #448555 sent by Samuel Rodal.


Modified: trunk/packages/qt4-x11/debian/changelog
===================================================================
--- trunk/packages/qt4-x11/debian/changelog	2009-03-16 11:06:57 UTC (rev 14072)
+++ trunk/packages/qt4-x11/debian/changelog	2009-03-16 16:34:22 UTC (rev 14073)
@@ -1,4 +1,4 @@
-qt4-x11 (4.5.0-2) UNRELEASED; urgency=low
+qt4-x11 (4.5.0-2) experimental; urgency=low
 
   * Add qt-copy patches:
     - 0275-qtconcurrent-threadcount.diff
@@ -6,9 +6,10 @@
       ignoring the configured number of threads for the main thread pool.
     - 0276-webkit-pedantic.diff
       Fix playground/base/plasma/applet/welcome compile with -pedantic.
-    - 0277-remove-blurrying-glyph.diff (Closes: #448555)
-      This patch removes blurrying glyph.
-      Thanks to M G Berberich.
+    - 0278-X11-Use-legacy-LCD-filtering-if-specified-in-font-c.diff
+      If Freetype is built without subpixel rendering, we should use
+      the Qt 3 intrapixel filter instead of the bitmap convolution
+      when the Legacy LCD filter is chosen. (Closes: #448555)
 
  -- Fathi Boudra <fabo at debian.org>  Mon, 16 Mar 2009 11:59:24 +0100
 

Deleted: trunk/packages/qt4-x11/debian/patches/0277-remove-blurrying-glyph.diff

Added: trunk/packages/qt4-x11/debian/patches/0278-X11-Use-legacy-LCD-filtering-if-specified-in-font-c.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/0278-X11-Use-legacy-LCD-filtering-if-specified-in-font-c.diff	                        (rev 0)
+++ trunk/packages/qt4-x11/debian/patches/0278-X11-Use-legacy-LCD-filtering-if-specified-in-font-c.diff	2009-03-16 16:34:22 UTC (rev 14073)
@@ -0,0 +1,70 @@
+qt-bugs@ issue : none
+Qt Software task ID : 248387
+bugs.kde.org number : none
+applied: no
+author: Samuel Rodal <sroedal at trolltech.com>
+
+[PATCH] X11: Use legacy LCD filtering if specified in font config.
+
+If Freetype is built without subpixel rendering, we should use
+the Qt 3 intrapixel filter instead of the bitmap convolution
+when the Legacy LCD filter is chosen.
+
+--- a/src/gui/text/qfontengine_ft.cpp
++++ b/src/gui/text/qfontengine_ft.cpp
+@@ -529,7 +529,7 @@ static const uint subpixel_filter[3][3] 
+ };
+ #endif
+ 
+-static void convertRGBToARGB(const uchar *src, uint *dst, int width, int height, int src_pitch, bool bgr)
++static void convertRGBToARGB(const uchar *src, uint *dst, int width, int height, int src_pitch, bool bgr, bool legacyFilter)
+ {
+     int h = height;
+     const int offs = bgr ? -1 : 1;
+@@ -540,8 +540,16 @@ static void convertRGBToARGB(const uchar
+             uint red = src[x+1-offs];
+             uint green = src[x+1];
+             uint blue = src[x+1+offs];
+-            uint alpha = green;
+-            uint res = (alpha << 24) + (red << 16) + (green << 8) + blue;
++            uint res;
++#if !defined(QT_USE_FREETYPE_LCDFILTER)
++            if (legacyFilter) {
++                uint high = (red*subpixel_filter[0][0] + green*subpixel_filter[0][1] + blue*subpixel_filter[0][2]) >> 8;
++                uint mid = (red*subpixel_filter[1][0] + green*subpixel_filter[1][1] + blue*subpixel_filter[1][2]) >> 8;
++                uint low = (red*subpixel_filter[2][0] + green*subpixel_filter[2][1] + blue*subpixel_filter[2][2]) >> 8;
++                res = (mid << 24) + (high << 16) + (mid << 8) + low;
++            } else
++#endif
++            res = (green << 24) + (red << 16) + (green << 8) + blue;
+             *dd = res;
+             ++dd;
+         }
+@@ -941,7 +949,7 @@ QFontEngineFT::Glyph *QFontEngineFT::loa
+         glyph_buffer = new uchar[glyph_buffer_size];
+ 
+         if (hsubpixel)
+-            convertRGBToARGB(slot->bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, slot->bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_RGB);
++            convertRGBToARGB(slot->bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, slot->bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_RGB, false);
+         else if (vfactor != 1)
+             convertRGBToARGB_V(slot->bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, slot->bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_VRGB);
+     } else
+@@ -1042,8 +1050,16 @@ QFontEngineFT::Glyph *QFontEngineFT::loa
+             Q_ASSERT (bitmap.pixel_mode == FT_PIXEL_MODE_GRAY);
+             Q_ASSERT(antialias);
+             uchar *convoluted = new uchar[bitmap.rows*bitmap.pitch];
+-            convoluteBitmap(bitmap.buffer, convoluted, bitmap.width, info.height, bitmap.pitch);
+-            convertRGBToARGB(convoluted + 1, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_RGB);
++            bool useLegacyLcdFilter = false;
++#if defined(FT_LCD_FILTER_H)
++            useLegacyLcdFilter = (lcdFilterType == FT_LCD_FILTER_LEGACY);
++#endif
++            uchar *buffer = bitmap.buffer;
++            if (!useLegacyLcdFilter) {
++                convoluteBitmap(bitmap.buffer, convoluted, bitmap.width, info.height, bitmap.pitch);
++                buffer = convoluted;
++            }
++            convertRGBToARGB(buffer + 1, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_RGB, useLegacyLcdFilter);
+             delete [] convoluted;
+         } else if (vfactor != 1) {
+             convertRGBToARGB_V(bitmap.buffer, (uint *)glyph_buffer, info.width, info.height, bitmap.pitch, subpixelType != QFontEngineFT::Subpixel_VRGB);

Modified: trunk/packages/qt4-x11/debian/patches/10_config_tests_fixes.diff
===================================================================
--- trunk/packages/qt4-x11/debian/patches/10_config_tests_fixes.diff	2009-03-16 11:06:57 UTC (rev 14072)
+++ trunk/packages/qt4-x11/debian/patches/10_config_tests_fixes.diff	2009-03-16 16:34:22 UTC (rev 14073)
@@ -56,3 +56,10 @@
  
  win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) {
  	!win32-borland:LIBS *= -lgds32_ms
+--- a/config.tests/unix/sqlite/sqlite.pro
++++ b/config.tests/unix/sqlite/sqlite.pro
+@@ -1,3 +1,4 @@
+ SOURCES = sqlite.cpp
+ CONFIG -= qt dylib
+ mac:CONFIG -= app_bundle
++LIBS += -ldl

Modified: trunk/packages/qt4-x11/debian/patches/series
===================================================================
--- trunk/packages/qt4-x11/debian/patches/series	2009-03-16 11:06:57 UTC (rev 14072)
+++ trunk/packages/qt4-x11/debian/patches/series	2009-03-16 16:34:22 UTC (rev 14073)
@@ -11,7 +11,7 @@
 0274-shm-native-image-fix.diff
 0275-qtconcurrent-threadcount.diff
 0276-webkit-pedantic.diff
-0277-remove-blurrying-glyph.diff
+0278-X11-Use-legacy-LCD-filtering-if-specified-in-font-c.diff
 
 # debian patches
 01_qmake_for_debian.diff




More information about the pkg-kde-commits mailing list