[webkit-reviews] review granted: [Bug 53468] Handle gpu-backed images in getUnmultipliedImageData() : [Attachment 80795] fix for 53468
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Feb 1 18:46:20 PST 2011
James Robinson <jamesr at chromium.org> has granted Mike Reed <reed at google.com>'s
request for review:
Bug 53468: Handle gpu-backed images in getUnmultipliedImageData()
https://bugs.webkit.org/show_bug.cgi?id=53468
Attachment 80795: fix for 53468
https://bugs.webkit.org/attachment.cgi?id=80795&action=review
------- Additional Comments from James Robinson <jamesr at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=80795&action=review
R=me, but the indentation seems off in most of the file. Please resolve that
before landing.
> WebCore/platform/graphics/skia/ImageBufferSkia.cpp:229
> + SkPMColor color = destBitmapRow[x];
indentation is off here (should be 4-space indent, not 5)
> WebCore/platform/graphics/skia/ImageBufferSkia.cpp:234
> + unsigned a = SkGetPackedA32(color);
> + destPixel[0] = a ? SkGetPackedR32(color) * 255 / a : 0;
> + destPixel[1] = a ? SkGetPackedG32(color) * 255 / a : 0;
> + destPixel[2] = a ? SkGetPackedB32(color) * 255 / a : 0;
same here - 4 space indent, not 5
would uint32_t be a better type for 'a' to be explicit about the size?
> WebCore/platform/graphics/skia/ImageBufferSkia.cpp:310
> + SkPMColor* destRow = bitmap.getAddr32(0, y);
another 5-space indent
> WebCore/platform/graphics/skia/ImageBufferSkia.cpp:316
> + if (multiplied == Unmultiplied)
> + destRow[x] = SkPreMultiplyARGB(srcPixel[3], srcPixel[0],
srcPixel[1], srcPixel[2]);
> + else
> + destRow[x] = SkPackARGB32(srcPixel[3], srcPixel[0],
srcPixel[1], srcPixel[2]);
also too far over
> WebCore/platform/graphics/skia/ImageBufferSkia.cpp:329
> + putImageData<Unmultiplied>(source, sourceSize, sourceRect, destPoint,
context()->platformContext()->canvas()->getDevice(), m_size);
5 spaces
> WebCore/platform/graphics/skia/ImageBufferSkia.cpp:335
> + context()->platformContext()->prepareForSoftwareDraw();
> + putImageData<Premultiplied>(source, sourceSize, sourceRect, destPoint,
context()->platformContext()->canvas()->getDevice(), m_size);
5 spaces
More information about the webkit-reviews
mailing list