[webkit-reviews] review denied: [Bug 34684] [Haiku] Fix rect conversion and image rendering on Haiku : [Attachment 48297] Fixes to the rect conversions and image rendering on Haiku
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 10 14:47:40 PST 2010
David Levin <levin at chromium.org> has denied Stephan Aßmus
<superstippi at gmx.de>'s request for review:
Bug 34684: [Haiku] Fix rect conversion and image rendering on Haiku
https://bugs.webkit.org/show_bug.cgi?id=34684
Attachment 48297: Fixes to the rect conversions and image rendering on Haiku
https://bugs.webkit.org/attachment.cgi?id=48297&action=review
------- Additional Comments from David Levin <levin at chromium.org>
Eric's comment plus these:
> Index: WebCore/platform/image-decoders/haiku/ImageDecoderHaiku.cpp
> NativeImagePtr RGBA32Buffer::asNewNativeImage() const
> {
> + int bytesPerRow = width() * sizeof(PixelData);
> + BBitmap* bmp = new BBitmap(BRect(0, 0, width() - 1, height() - 1), 0,
> + B_RGBA32, bytesPerRow);
You don't need to wrap this line, but if you're going to do this, I think folks
typically align with the enclosing paren.
> +
> + const uint8* src = reinterpret_cast<const uint8*>(m_bytes.data());
> + uint8* dst = reinterpret_cast<uint8*>(bmp->Bits());
In general WebKit, likes to avoid abbreviations. s/src/source/
s/dst/destination/
> + int h = height();
> + for (int y = 0; y < h; y++) {
> + memcpy(dst, src, bytesPerRow);
> + dst += bytesPerRow;
> + src += bytesPerRow;
Why doesn't this just do memcpy(dst, src, bytesPerRow * h); ?
More information about the webkit-reviews
mailing list