[webkit-reviews] review granted: [Bug 22186] [QT] lacks putImageData support in Canvas : [Attachment 28168] putImageData support for Qt

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 2 06:09:42 PST 2009


Holger Freyther <zecke at selfish.org> has granted Dirk Schulze
<krit at webkit.org>'s request for review:
Bug 22186: [QT] lacks putImageData support in Canvas
https://bugs.webkit.org/show_bug.cgi?id=22186

Attachment 28168: putImageData support for Qt
https://bugs.webkit.org/attachment.cgi?id=28168&action=review

------- Additional Comments from Holger Freyther <zecke at selfish.org>
> + [QT] lacks putImageData support in Canvas

Qt please.


> +    unsigned char* srcRows = source->data()->data()->data() + originy *
srcBytesPerRow + originx * 4;
> +    for (int y = 0; y < numRows; ++y) {
> +	   quint32* scanLine = reinterpret_cast<quint32*>(image.scanLine(y +
desty));
> +	   for (int x = 0; x < numColumns; x++) {
> +	       int basex = x * 4;
> +
> +	       scanLine[x + destx] = reinterpret_cast<quint32*>(srcRows +
basex)[0];
> +	   }
> +	   srcRows += srcBytesPerRow;
> +    }
> +    m_data.m_pixmap = QPixmap::fromImage(image);

weird spacing here... extra line in the for/for... but not at the end of the
loops..


> +    if (isPainting)
> +	   m_data.m_painter->begin(&m_data.m_pixmap);
>  }

and the naming is really weird here..:
   endy,endx vs. endY, endX
   srcRows vs. srcRow.. but all this is coming from the CG variant so I will
put it back my complains... just change the spacing and QT... thanks for
removing the last notImplemented from there.


More information about the webkit-reviews mailing list