diff options
author | Jason Sams <rjsams@android.com> | 2009-07-29 20:55:44 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-07-29 20:55:44 -0700 |
commit | faf1520be77aa01903f9ad87990377f44e185224 (patch) | |
tree | b19baaf038a4543185644735b8bc38405e7c4686 /libs/rs/rsAllocation.cpp | |
parent | 31b532ee9e1aaebbe383b13422cc59df43de4725 (diff) | |
download | frameworks_base-faf1520be77aa01903f9ad87990377f44e185224.zip frameworks_base-faf1520be77aa01903f9ad87990377f44e185224.tar.gz frameworks_base-faf1520be77aa01903f9ad87990377f44e185224.tar.bz2 |
Filmstrip work and boxed bitmap load bugfixes.
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
-rw-r--r-- | libs/rs/rsAllocation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index c6a9149..ca277ef 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<const uint8_t *>(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); |