[Webkit-unassigned] [Bug 34684] [Haiku] Fix rect conversion and image rendering on Haiku
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Feb 10 14:47:40 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=34684
David Levin <levin at chromium.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #48297|review? |review-
Flag| |
--- Comment #5 from David Levin <levin at chromium.org> 2010-02-10 14:47:40 PST ---
(From update of attachment 48297)
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); ?
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list