Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/plugins/imageformats/gif/gif.pro

    r2 r561  
    99target.path += $$[QT_INSTALL_PLUGINS]/imageformats
    1010INSTALLS += target
     11
     12
  • trunk/src/plugins/imageformats/gif/main.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the plugins of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
  • trunk/src/plugins/imageformats/gif/qgifhandler.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the plugins of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    5454
    5555#define Q_TRANSPARENT 0x00ffffff
     56
     57
     58
     59
    5660
    5761/*
     
    136140    bool out_of_bounds;
    137141    bool digress;
    138     void nextY(QImage *image);
     142    void nextY();
    139143    void disposePrevious(QImage *image);
    140144};
     
    233237    //    CompuServe Incorporated."
    234238
     239
     240
     241
     242
    235243#define LM(l, m) (((m)<<8)|l)
    236244    digress = false;
    237     int initial = length;
     245    int initial = length;
    238246    while (!digress && length) {
    239247        length--;
     
    334342
    335343                QImage::Format format = trans_index >= 0 ? QImage::Format_ARGB32 : QImage::Format_RGB32;
    336                 if (image->isNull() || (image->size() != QSize(swidth, sheight)) || image->format() != format) {
     344                if (image->isNull()) {
    337345                    (*image) = QImage(swidth, sheight, format);
    338                     memset(image->bits(), 0, image->numBytes());
     346                    bpl = image->bytesPerLine();
     347                    bits = image->bits();
     348                    memset(bits, 0, image->byteCount());
    339349
    340350                    // ### size of the upcoming frame, should rather
     
    394404                                              qMax(backingstore.height(), h),
    395405                                              QImage::Format_RGB32);
    396                         memset(image->bits(), 0, image->numBytes());
     406                        memset(());
    397407                    }
     408
     409
    398410                    for (int ln=0; ln<h; ln++) {
    399                         memcpy(backingstore.scanLine(ln),
    400                                image->scanLine(t+ln)+l, w*sizeof(QRgb));
     411                        memcpy(ln),
     412                               l, w*sizeof(QRgb));
    401413                    }
    402414                }
     
    471483                        firstcode=oldcode=code;
    472484                        if (!out_of_bounds && image->height() > y && firstcode!=trans_index)
    473                             ((QRgb*)image->scanLine(y))[x] = color(firstcode);
     485                            ((QRgb*)y))[x] = color(firstcode);
    474486                        x++;
    475487                        if (x>=swidth) out_of_bounds = true;
     
    478490                            x=left;
    479491                            out_of_bounds = left>=swidth || y>=sheight;
    480                             nextY(image);
     492                            nextY();
    481493                        }
    482494                    } else {
     
    516528                        QRgb *line = 0;
    517529                        if (!out_of_bounds && h > y)
    518                             line = (QRgb*)image->scanLine(y);
     530                            line = (QRgb*)y);
    519531                        while (sp>stack) {
    520532                            const uchar index = *(--sp);
     
    530542                                x=left;
    531543                                out_of_bounds = left>=swidth || y>=sheight;
    532                                 nextY(image);
     544                                nextY();
    533545                                if (!out_of_bounds && h > y)
    534                                     line = (QRgb*)image->scanLine(y);
     546                                    line = (QRgb*)y);
    535547                            }
    536548                        }
     
    645657}
    646658
    647 void QGIFFormat::nextY(QImage *image)
     659void QGIFFormat::nextY()
    648660{
    649661    int my;
     
    661673        if (trans_index < 0) {
    662674            for (i=1; i<=my; i++) {
    663                 memcpy(image->scanLine(y+i)+left*sizeof(QRgb), image->scanLine(y)+left*sizeof(QRgb),
     675                memcpy(y)+left*sizeof(QRgb),
    664676                       (right-left+1)*sizeof(QRgb));
    665677            }
     
    690702        if (trans_index < 0) {
    691703            for (i=1; i<=my; i++) {
    692                 memcpy(image->scanLine(y+i)+left*sizeof(QRgb), image->scanLine(y)+left*sizeof(QRgb),
     704                memcpy(y)+left*sizeof(QRgb),
    693705                       (right-left+1)*sizeof(QRgb));
    694706            }
     
    714726        if (trans_index < 0) {
    715727            for (i=1; i<=my; i++) {
    716                 memcpy(image->scanLine(y+i)+left*sizeof(QRgb), image->scanLine(y)+left*sizeof(QRgb),
     728                memcpy(y)+left*sizeof(QRgb),
    717729                       (right-left+1)*sizeof(QRgb));
    718730            }
  • trunk/src/plugins/imageformats/gif/qgifhandler.h

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the plugins of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
Note: See TracChangeset for help on using the changeset viewer.