Changeset 63652 in webkit


Ignore:
Timestamp:
Jul 19, 2010 5:45:50 AM (14 years ago)
Author:
andreas.kling@nokia.com
Message:

2010-07-19 Andreas Kling <andreas.kling@nokia.com>

Reviewed by Kenneth Rohde Christiansen.

[Qt] Avoid QImage::pixel() in getImageData()
https://bugs.webkit.org/show_bug.cgi?id=42463

  • platform/graphics/qt/ImageBufferQt.cpp: (WebCore::getImageData): Use QImage::scanLine() instead of fetching data pixel-by-pixel.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r63649 r63652  
     12010-07-19  Andreas Kling  <andreas.kling@nokia.com>
     2
     3        Reviewed by Kenneth Rohde Christiansen.
     4
     5        [Qt] Avoid QImage::pixel() in getImageData()
     6        https://bugs.webkit.org/show_bug.cgi?id=42463
     7
     8        * platform/graphics/qt/ImageBufferQt.cpp:
     9        (WebCore::getImageData): Use QImage::scanLine() instead
     10        of fetching data pixel-by-pixel.
     11
    1122010-07-19  Yury Semikhatsky  <yurys@chromium.org>
    213
  • trunk/WebCore/platform/graphics/qt/ImageBufferQt.cpp

    r63606 r63652  
    187187    unsigned char* destRows = data + desty * destBytesPerRow + destx * 4;
    188188    for (int y = 0; y < numRows; ++y) {
     189#if QT_VERSION >= 0x040700
     190        const quint32* scanLine = reinterpret_cast<const quint32*>(image.constScanLine(y + originy));
     191#else
     192        quint32* scanLine = reinterpret_cast<quint32*>(image.scanLine(y + originy));
     193#endif
    189194        for (int x = 0; x < numColumns; x++) {
    190             QRgb value = image.pixel(x + originx, y + originy);
     195            QRgb value = scanLine[x + originx];
    191196            int basex = x * 4;
    192197
Note: See TracChangeset for help on using the changeset viewer.