Author: arekm                        Date: Sat Feb 24 15:11:02 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- update from upstream

---- Files affected:
SOURCES:
   0001-dnd_optimization.patch (1.1 -> 1.2) , 0005-qpixmap_mitshm.patch (1.1 -> 
1.2) , 0007-qpixmap_constants.patch (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SOURCES/0001-dnd_optimization.patch
diff -u SOURCES/0001-dnd_optimization.patch:1.1 
SOURCES/0001-dnd_optimization.patch:1.2
--- SOURCES/0001-dnd_optimization.patch:1.1     Mon Feb  5 18:34:40 2007
+++ SOURCES/0001-dnd_optimization.patch Sat Feb 24 16:10:57 2007
@@ -5,8 +5,9 @@
 See http://lists.kde.org/?t=104388858900001&r=1&w=2
 
 
---- src/kernel/qdnd_x11.cpp.sav        2003-02-05 16:09:45.000000000 +0100
-+++ src/kernel/qdnd_x11.cpp    2003-02-07 16:14:49.000000000 +0100
+
+--- src/kernel/qdnd_x11.cpp
++++ src/kernel/qdnd_x11.cpp
 @@ -49,13 +49,15 @@
  #include "qdragobject.h"
  #include "qobjectlist.h"
@@ -25,7 +26,7 @@
  #undef KeyPress
  #undef KeyRelease
  
-@@ -249,20 +251,47 @@ class QShapedPixmapWidget : public QWidg
+@@ -253,20 +255,47 @@ class QShapedPixmapWidget : public QWidg
  public:
      QShapedPixmapWidget(int screen = -1) :
        QWidget(QApplication::desktop()->screen( screen ),
@@ -75,8 +76,8 @@
 +    QPoint oldhot;
  };
  
- QShapedPixmapWidget * qt_xdnd_deco = 0;
-@@ -859,6 +888,45 @@ void QDragManager::timerEvent( QTimerEve
+ static QShapedPixmapWidget * qt_xdnd_deco = 0;
+@@ -872,6 +901,45 @@ void QDragManager::timerEvent( QTimerEve
        move( QCursor::pos() );
  }
  
@@ -122,7 +123,7 @@
  bool QDragManager::eventFilter( QObject * o, QEvent * e)
  {
      if ( beingCancelled ) {
-@@ -881,8 +949,10 @@ bool QDragManager::eventFilter( QObject 
+@@ -894,8 +962,10 @@ bool QDragManager::eventFilter( QObject 
  
      if ( e->type() == QEvent::MouseMove ) {
        QMouseEvent* me = (QMouseEvent *)e;
@@ -135,16 +136,16 @@
        return TRUE;
      } else if ( e->type() == QEvent::MouseButtonRelease ) {
        qApp->removeEventFilter( this );
-@@ -1106,7 +1176,7 @@ void QDragManager::move( const QPoint & 
-       delete qt_xdnd_deco;
-       qt_xdnd_deco = new QShapedPixmapWidget( screen );
+@@ -1136,7 +1206,7 @@ void QDragManager::move( const QPoint & 
+           qt_xdnd_deco->grabMouse();
+       }
      }
 -    updatePixmap();
 +    updatePixmap( globalPos );
  
      if ( qt_xdnd_source_sameanswer.contains( globalPos ) &&
         qt_xdnd_source_sameanswer.isValid() ) {
-@@ -1679,7 +1749,7 @@ bool QDragManager::drag( QDragObject * o
+@@ -1729,7 +1799,7 @@ bool QDragManager::drag( QDragObject * o
      // qt_xdnd_source_object persists until we get an xdnd_finish message
  }
  
@@ -153,7 +154,7 @@
  {
      if ( qt_xdnd_deco ) {
        QPixmap pm;
-@@ -1694,9 +1764,8 @@ void QDragManager::updatePixmap()
+@@ -1744,9 +1814,8 @@ void QDragManager::updatePixmap()
                defaultPm = new QPixmap(default_pm);
            pm = *defaultPm;
        }
@@ -165,7 +166,7 @@
            //if ( willDrop ) {
            qt_xdnd_deco->show();
            //} else {
-@@ -1705,4 +1774,9 @@ void QDragManager::updatePixmap()
+@@ -1755,4 +1824,9 @@ void QDragManager::updatePixmap()
      }
  }
  
@@ -175,8 +176,8 @@
 +}
 +
  #endif // QT_NO_DRAGANDDROP
---- src/kernel/qdragobject.h.sav       2002-11-01 19:25:07.000000000 +0100
-+++ src/kernel/qdragobject.h   2001-01-01 01:01:00.000000000 +0100
+--- src/kernel/qdragobject.h
++++ src/kernel/qdragobject.h
 @@ -245,6 +245,7 @@ private:
      void move( const QPoint & );
      void drop();

================================================================
Index: SOURCES/0005-qpixmap_mitshm.patch
diff -u SOURCES/0005-qpixmap_mitshm.patch:1.1 
SOURCES/0005-qpixmap_mitshm.patch:1.2
--- SOURCES/0005-qpixmap_mitshm.patch:1.1       Mon Feb  5 18:34:40 2007
+++ SOURCES/0005-qpixmap_mitshm.patch   Sat Feb 24 16:10:57 2007
@@ -67,8 +67,9 @@
 about 40% for 32bpp. Imlib probably still beats that, but at least this 
 obsoletes KPixmapIO.
 
---- src/kernel/qpixmap_x11.cpp.sav     2003-06-30 15:14:46.000000000 +0200
-+++ src/kernel/qpixmap_x11.cpp 2003-06-30 15:51:37.000000000 +0200
+
+--- src/kernel/qpixmap_x11.cpp
++++ src/kernel/qpixmap_x11.cpp
 @@ -37,7 +37,19 @@
  
  // NOT REVISED
@@ -123,7 +124,7 @@
  
 -#endif // QT_MITSHM
 +#endif // QT_MITSHM_XFORM
- 
++
 +#ifdef QT_MITSHM_CONVERSIONS
 +
 +static bool qt_mitshm_error = false;
@@ -214,17 +215,16 @@
 +    }
 +    return xi;
 +}
-+
+ 
 +#endif // QT_MITSHM_CONVERSIONS
  
  /*****************************************************************************
    Internal functions
-@@ -625,9 +728,20 @@ QImage QPixmap::convertToImage() const
+@@ -627,9 +730,20 @@ QImage QPixmap::convertToImage() const
        d = 32;                                 //   > 8  ==> 32
  
      XImage *xi = (XImage *)data->ximage;      // any cached ximage?
 -    if ( !xi )                                        // fetch data from X 
server
--      xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes,
 +#ifdef QT_MITSHM_CONVERSIONS
 +    bool mitshm_ximage = false;
 +    XShmSegmentInfo shminfo;
@@ -236,13 +236,13 @@
 +            mitshm_ximage = true;
 +        } else
 +#endif
-+          xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes,
+       xi = XGetImage( x11Display(), hd, 0, 0, w, h, AllPlanes,
                        mono ? XYPixmap : ZPixmap );
 +    }
      Q_CHECK_PTR( xi );
- 
-     QImage::Endian bitOrder = QImage::IgnoreEndian;
-@@ -636,15 +750,31 @@ QImage QPixmap::convertToImage() const
+     if (!xi)
+         return image; // null image
+@@ -640,15 +754,31 @@ QImage QPixmap::convertToImage() const
                   QImage::LittleEndian : QImage::BigEndian;
      }
      image.create( w, h, d, 0, bitOrder );
@@ -276,21 +276,19 @@
  
        if (axi) {
            image.setAlphaBuffer( TRUE );
-@@ -658,7 +788,12 @@ QImage QPixmap::convertToImage() const
+@@ -662,6 +792,11 @@ QImage QPixmap::convertToImage() const
                src += axi->bytes_per_line;
            }
  
--          qSafeXDestroyImage( axi );
 +#ifdef QT_MITSHM_CONVERSIONS
 +            if( mitshm_aximage )
 +                qt_XShmDestroyImage( axi, &ashminfo );
 +            else
 +#endif
-+              qSafeXDestroyImage( axi );
+           qSafeXDestroyImage( axi );
        }
      } else if (msk) {
-       image.setAlphaBuffer( TRUE );
-@@ -800,6 +935,12 @@ QImage QPixmap::convertToImage() const
+@@ -804,6 +939,12 @@ QImage QPixmap::convertToImage() const
                  xi->bits_per_pixel );
  #endif
        image.reset();
@@ -303,17 +301,16 @@
        return image;
      }
  
-@@ -905,10 +1046,22 @@ QImage QPixmap::convertToImage() const
+@@ -909,10 +1050,22 @@ QImage QPixmap::convertToImage() const
        delete [] carr;
      }
      if ( data->optim != BestOptim ) {         // throw away image data
--      qSafeXDestroyImage( xi );
 +#ifdef QT_MITSHM_CONVERSIONS
 +        if( mitshm_ximage )
 +            qt_XShmDestroyImage( xi, &shminfo );
 +        else
 +#endif
-+            qSafeXDestroyImage( xi );
+       qSafeXDestroyImage( xi );
        ((QPixmap*)this)->data->ximage = 0;
 -    } else                                    // keep ximage data
 +    } else {                                  // keep ximage data
@@ -328,8 +325,8 @@
  
      return image;
  }
-@@ -1078,6 +1231,11 @@ bool QPixmap::convertFromImage( const QI
-     bool    trucol = (visual->c_class == TrueColor);
+@@ -1085,6 +1238,11 @@ bool QPixmap::convertFromImage( const QI
+     bool    trucol = (visual->c_class == TrueColor || visual->c_class == 
DirectColor);
      int           nbytes = image.numBytes();
      uchar  *newbits= 0;
 +    int newbits_size = 0;
@@ -340,28 +337,27 @@
  
      if ( trucol ) {                           // truecolor display
        QRgb  pix[256];                         // pixel translation table
-@@ -1106,9 +1264,18 @@ bool QPixmap::convertFromImage( const QI
+@@ -1113,10 +1271,18 @@ bool QPixmap::convertFromImage( const QI
            }
        }
  
--      xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
 +#ifdef QT_MITSHM_CONVERSIONS
-+        xi = qt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, 
&shminfo );
-+        if( xi != NULL ) {
-+            mitshm_ximage = true;
-+            newbits = (uchar*)xi->data;
-+        }
-+        else
-+#endif
-+          xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
-       Q_CHECK_PTR( xi );
--      newbits = (uchar *)malloc( xi->bytes_per_line*h );
-+        if( newbits == NULL )
-+          newbits = (uchar *)malloc( xi->bytes_per_line*h );
++      xi = qt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, 
&shminfo );
++      if( xi != NULL ) {
++          mitshm_ximage = true;
++          newbits = (uchar*)xi->data;
++      }
++      else
++#endif
+       xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
+-      Q_CHECK_PTR( xi );
+         if (!xi)
+             return false;
++      if( newbits == NULL )
+       newbits = (uchar *)malloc( xi->bytes_per_line*h );
        Q_CHECK_PTR( newbits );
        if ( !newbits )                         // no memory
-           return FALSE;
-@@ -1314,6 +1481,7 @@ bool QPixmap::convertFromImage( const QI
+@@ -1323,6 +1489,7 @@ bool QPixmap::convertFromImage( const QI
        }
  
        newbits = (uchar *)malloc( nbytes );    // copy image into newbits
@@ -369,18 +365,17 @@
        Q_CHECK_PTR( newbits );
        if ( !newbits )                         // no memory
            return FALSE;
-@@ -1431,11 +1599,18 @@ bool QPixmap::convertFromImage( const QI
+@@ -1440,11 +1607,18 @@ bool QPixmap::convertFromImage( const QI
      }
  
      if ( !xi ) {                              // X image not created
--      xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
 +#ifdef QT_MITSHM_CONVERSIONS
 +        xi = qt_XShmCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0, 
&shminfo );
 +        if( xi != NULL )
 +            mitshm_ximage = true;
 +        else
 +#endif
-+          xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
+       xi = XCreateImage( dpy, visual, dd, ZPixmap, 0, 0, w, h, 32, 0 );
        if ( xi->bits_per_pixel == 16 ) {       // convert 8 bpp ==> 16 bpp
            ushort *p2;
            int     p2inc = xi->bytes_per_line/sizeof(ushort);
@@ -389,11 +384,10 @@
            Q_CHECK_PTR( newerbits );
            if ( !newerbits )                           // no memory
                return FALSE;
-@@ -1453,7 +1628,15 @@ bool QPixmap::convertFromImage( const QI
+@@ -1462,6 +1636,14 @@ bool QPixmap::convertFromImage( const QI
                      "(bpp=%d)", xi->bits_per_pixel );
  #endif
        }
--      xi->data = (char *)newbits;
 +#ifdef QT_MITSHM_CONVERSIONS
 +        if( newbits_size > 0 && mitshm_ximage ) { // need to copy to shared 
memory
 +            memcpy( xi->data, newbits, newbits_size );
@@ -402,24 +396,21 @@
 +        }
 +        else
 +#endif
-+            xi->data = (char *)newbits;
+       xi->data = (char *)newbits;
      }
  
-     if ( hd && (width() != (int)w || height() != (int)h || this->depth() != 
dd) ) {
-@@ -1486,19 +1669,24 @@ bool QPixmap::convertFromImage( const QI
+@@ -1495,19 +1677,24 @@ bool QPixmap::convertFromImage( const QI
  
      }
  
--    XPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE  ),
--             xi, 0, 0, 0, 0, w, h );
 +#ifdef QT_MITSHM_CONVERSIONS
 +    if( mitshm_ximage )
 +        XShmPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE ),
 +                      xi, 0, 0, 0, 0, w, h, False );
 +    else
 +#endif
-+        XPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE  ),
-+                   xi, 0, 0, 0, 0, w, h );
+     XPutImage( dpy, hd, qt_xget_readonly_gc( x11Screen(), FALSE  ),
+              xi, 0, 0, 0, 0, w, h );
  
 -    if ( data->optim != BestOptim ) {         // throw away image
 -      qSafeXDestroyImage( xi );
@@ -439,46 +430,41 @@
      if ( image.hasAlphaBuffer() ) {
        QBitmap m;
        m = image.createAlphaMask( conversion_flags );
-@@ -1534,13 +1722,22 @@ bool QPixmap::convertFromImage( const QI
+@@ -1543,13 +1730,22 @@ bool QPixmap::convertFromImage( const QI
            data->alphapm->rendhd =
                (HANDLE) XftDrawCreateAlpha( x11Display(), data->alphapm->hd, 8 
);
  
 -          XImage *axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
--                                     8, ZPixmap, 0, 0, w, h, 8, 0);
 +#ifdef QT_MITSHM_CONVERSIONS
-+            axi = qt_XShmCreateImage( x11Display(), (Visual*)x11Visual(),
-+                                      8, ZPixmap, 0, 0, w, h, 8, 0, &ashminfo 
);
-+            if( axi != NULL )
-+                mitshm_aximage = true;
-+            else
++          axi = qt_XShmCreateImage( x11Display(), (Visual*)x11Visual(),
++                  8, ZPixmap, 0, 0, w, h, 8, 0, &ashminfo );
++          if( axi != NULL )
++              mitshm_aximage = true;
++          else
 +#endif
-+              axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
-+                                 8, ZPixmap, 0, 0, w, h, 8, 0);
++              axi = XCreateImage(x11Display(), (Visual *) x11Visual(),
+                                      8, ZPixmap, 0, 0, w, h, 8, 0);
  
            if (axi) {
--              // the data is deleted by qSafeXDestroyImage
--              axi->data = (char *) malloc(h * axi->bytes_per_line);
--              Q_CHECK_PTR( axi->data );
-+                if( axi->data==NULL ) {
-+                  // the data is deleted by qSafeXDestroyImage
-+                  axi->data = (char *) malloc(h * axi->bytes_per_line);
-+                  Q_CHECK_PTR( axi->data );
-+                }
-               char *aptr = axi->data;
- 
-               if (image.depth() == 32) {
-@@ -1558,14 +1755,48 @@ bool QPixmap::convertFromImage( const QI
-               }
- 
-               GC gc = XCreateGC(x11Display(), data->alphapm->hd, 0, 0);
--              XPutImage(dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h);
-+#ifdef QT_MITSHM_CONVERSIONS
-+                if( mitshm_aximage )
-+                    XShmPutImage( dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 
0, w, h, False );
-+                else
++              if( axi->data==NULL ) {
+               // the data is deleted by qSafeXDestroyImage
+                 axi->data = (char *) malloc(h * axi->bytes_per_line);
+               Q_CHECK_PTR( axi->data );
++              }
+                 char *aptr = axi->data;
+ 
+                 if (image.depth() == 32) {
+@@ -1567,14 +1763,48 @@ bool QPixmap::convertFromImage( const QI
+                 }
+ 
+                 GC gc = XCreateGC(x11Display(), data->alphapm->hd, 0, 0);
++ #ifdef QT_MITSHM_CONVERSIONS
++              if( mitshm_aximage )
++                  XShmPutImage( dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, 
w, h, False );
++              else
 +#endif
-+                  XPutImage(dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, 
h);
-               XFreeGC(x11Display(), gc);
+                 XPutImage(dpy, data->alphapm->hd, gc, axi, 0, 0, 0, 0, w, h);
+                 XFreeGC(x11Display(), gc);
 -              qSafeXDestroyImage(axi);
            }
        }
@@ -490,22 +476,22 @@
 +        XSync( x11Display(), False ); // wait until processed
 +#endif
 +
-+    if ( data->optim != BestOptim ) {         // throw away image
++    if ( data->optim != BestOptim ) {       // throw away image
 +#ifdef QT_MITSHM_CONVERSIONS
 +        if( mitshm_ximage )
 +            qt_XShmDestroyImage( xi, &shminfo );
 +        else
 +#endif
-+      qSafeXDestroyImage( xi );
-+      data->ximage = 0;
-+    } else {                                  // keep ximage that we created
++     qSafeXDestroyImage( xi );
++     data->ximage = 0;
++    } else {      // keep ximage that we created
 +#ifdef QT_MITSHM_CONVERSIONS
 +        if( mitshm_ximage ) { // copy the XImage?
 +            qt_XShmDestroyImage( xi, &shminfo );
 +            xi = 0;
 +        }
 +#endif
-+      data->ximage = xi;
++     data->ximage = xi;
 +    }
 +    if( axi ) {
 +#ifdef QT_MITSHM_CONVERSIONS
@@ -518,7 +504,7 @@
      return TRUE;
  }
  
-@@ -1722,7 +1953,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
+@@ -1737,7 +1967,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
        return pm;
      }
  
@@ -527,7 +513,7 @@
      static bool try_once = TRUE;
      if (try_once) {
        try_once = FALSE;
-@@ -1755,7 +1986,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
+@@ -1770,7 +2000,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
        dbpl = ((w*bpp+31)/32)*4;
      dbytes = dbpl*h;
  
@@ -536,7 +522,7 @@
      if ( use_mitshm ) {
        dptr = (uchar *)xshmimg->data;
        uchar fillbyte = bpp == 8 ? white.pixel() : 0xff;
-@@ -1771,7 +2002,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
+@@ -1786,7 +2016,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
            memset( dptr, Qt::white.pixel( x11Screen() ), dbytes );
        else
            memset( dptr, 0xff, dbytes );
@@ -545,7 +531,7 @@
      }
  #endif
  
-@@ -1802,7 +2033,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
+@@ -1817,7 +2047,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
      } else {
        xbpl  = (w*bpp)/8;
        p_inc = dbpl - xbpl;
@@ -554,7 +540,7 @@
        if ( use_mitshm )
            p_inc = xshmimg->bytes_per_line - xbpl;
  #endif
-@@ -1839,7 +2070,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
+@@ -1854,7 +2084,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
        QPixmap pm( w, h );
        pm.data->uninit = FALSE;
        pm.x11SetScreen( x11Screen() );
@@ -563,7 +549,7 @@
        if ( use_mitshm ) {
            XCopyArea( dpy, xshmpm, pm.handle(), gc, 0, 0, w, h, 0, 0 );
        } else {
-@@ -1848,7 +2079,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
+@@ -1863,7 +2093,7 @@ QPixmap QPixmap::xForm( const QWMatrix &
                               ZPixmap, 0, (char *)dptr, w, h, 32, 0 );
            XPutImage( dpy, pm.handle(), gc, xi, 0, 0, 0, 0, w, h);
            qSafeXDestroyImage( xi );
@@ -572,8 +558,8 @@
        }
  #endif
  
---- mkspecs/linux-g++/qplatformdefs.h.sav      2003-01-03 19:04:11.000000000 
+0100
-+++ mkspecs/linux-g++/qplatformdefs.h  2003-06-30 17:56:39.000000000 +0200
+--- mkspecs/linux-g++/qplatformdefs.h
++++ mkspecs/linux-g++/qplatformdefs.h
 @@ -102,5 +102,6 @@
  #define QT_VSNPRINTF          ::vsnprintf
  #endif

================================================================
Index: SOURCES/0007-qpixmap_constants.patch
diff -u SOURCES/0007-qpixmap_constants.patch:1.1 
SOURCES/0007-qpixmap_constants.patch:1.2
--- SOURCES/0007-qpixmap_constants.patch:1.1    Mon Feb  5 18:34:40 2007
+++ SOURCES/0007-qpixmap_constants.patch        Sat Feb 24 16:10:57 2007
@@ -4,9 +4,10 @@
 
 See 0005-qpixmap_mitshm.patch for details.
 
---- src/kernel/qpixmap_x11.cpp.sav     Tue Nov 26 15:32:21 2002
-+++ src/kernel/qpixmap_x11.cpp Tue Nov 26 15:37:21 2002
-@@ -1278,9 +1278,6 @@ bool QPixmap::convertFromImage( const QI
+
+--- src/kernel/qpixmap_x11.cpp
++++ src/kernel/qpixmap_x11.cpp
+@@ -1123,9 +1123,6 @@ bool QPixmap::convertFromImage( const QI
            return FALSE;
        int    bppc = xi->bits_per_pixel;
  
@@ -16,7 +17,7 @@
        bool contig_bits = n_bits(red_mask) == rbits &&
                             n_bits(green_mask) == gbits &&
                             n_bits(blue_mask) == bbits;
-@@ -1329,32 +1326,70 @@ bool QPixmap::convertFromImage( const QI
+@@ -1174,32 +1171,70 @@ bool QPixmap::convertFromImage( const QI
            }
            init=TRUE;
        }
@@ -103,7 +104,7 @@
  #define GET_PIXEL_DITHER_TC \
                int r = qRed  ( *p ); \
                int g = qGreen( *p ); \
-@@ -1374,91 +1409,177 @@ bool QPixmap::convertFromImage( const QI
+@@ -1220,91 +1255,177 @@ bool QPixmap::convertFromImage( const QI
                    ? g << green_shift : g >> -green_shift; \
                b = blue_shift  > 0 \
                    ? b << blue_shift  : b >> -blue_shift; \
@@ -353,17 +354,17 @@
      }
  
      if ( d == 8 && !trucol ) {                        // 8 bit pixmap
-@@ -1738,15 +1859,24 @@ bool QPixmap::convertFromImage( const QI
+@@ -1554,15 +1675,24 @@ bool QPixmap::convertFromImage( const QI
  
-               if (image.depth() == 32) {
-                   const int *iptr = (const int *) image.bits();
--                  int max = w * h;
--                  while (max--)
--                      *aptr++ = *iptr++ >> 24; // squirt
+                 if (image.depth() == 32) {
+                     const int *iptr = (const int *) image.bits();
+-                    int max = w * h;
+-                    while (max--)
+-                        *aptr++ = *iptr++ >> 24; // squirt
 +                    if( axi->bytes_per_line == (int)w ) {
-+                      int max = w * h;
-+                      while (max--)
-+                          *aptr++ = *iptr++ >> 24; // squirt
++                        int max = w * h;
++                        while (max--)
++                            *aptr++ = *iptr++ >> 24; // squirt
 +                    } else {
 +                        for (uint i = 0; i < h; ++i ) {
 +                            for (uint j = 0; j < w; ++j )
@@ -371,13 +372,13 @@
 +                            aptr += ( axi->bytes_per_line - w );
 +                        }
 +                    }
-               } else if (image.depth() == 8) {
-                   const QRgb * const rgb = image.colorTable();
-                   for (uint y = 0; y < h; ++y) {
-                       const uchar *iptr = image.scanLine(y);
-                       for (uint x = 0; x < w; ++x)
-                           *aptr++ = qAlpha(rgb[*iptr++]);
+                 } else if (image.depth() == 8) {
+                     const QRgb * const rgb = image.colorTable();
+                     for (uint y = 0; y < h; ++y) {
+                         const uchar *iptr = image.scanLine(y);
+                         for (uint x = 0; x < w; ++x)
+                             *aptr++ = qAlpha(rgb[*iptr++]);
 +                        aptr += ( axi->bytes_per_line - w );
-                   }
-               }
+                     }
+                 }
  
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/SOURCES/0001-dnd_optimization.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/SOURCES/0005-qpixmap_mitshm.patch?r1=1.1&r2=1.2&f=u
    
http://cvs.pld-linux.org/SOURCES/0007-qpixmap_constants.patch?r1=1.1&r2=1.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to