From faf1520be77aa01903f9ad87990377f44e185224 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Wed, 29 Jul 2009 20:55:44 -0700 Subject: Filmstrip work and boxed bitmap load bugfixes. --- libs/rs/rsAllocation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/rs/rsAllocation.cpp') diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index c6a9149bc5c2..ca277ef789b7 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -377,9 +377,9 @@ RsAllocation rsi_AllocationCreateFromBitmapBoxed(Context *rsc, uint32_t w, uint3 const uint8_t * src = static_cast(data); for (uint32_t y = 0; y < h; y++) { - uint8_t * ydst = &tmp[y + ((h2 - h) >> 1)]; + uint8_t * ydst = &tmp[(y + ((h2 - h) >> 1)) * w2 * bpp]; memcpy(&ydst[(w2 - w) >> 1], src, w * bpp); - src += h * bpp; + src += w * bpp; } RsAllocation ret = rsi_AllocationCreateFromBitmap(rsc, w2, h2, dstFmt, srcFmt, genMips, tmp); -- cgit v1.2.3-59-g8ed1b