summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsAllocation.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-12-06 15:59:59 -0800
committerJason Sams <rjsams@android.com>2010-12-06 17:46:20 -0800
commitbf6ef8d78fffbce6c1849a4a28fb3f4401ad039e (patch)
tree7bbf2a1d7b8034834e49fa6b636deafcf874d277 /libs/rs/rsAllocation.cpp
parent11a8af5ea1e5a760e6d40f025f9cbc356edf1894 (diff)
downloadframeworks_base-bf6ef8d78fffbce6c1849a4a28fb3f4401ad039e.zip
frameworks_base-bf6ef8d78fffbce6c1849a4a28fb3f4401ad039e.tar.gz
frameworks_base-bf6ef8d78fffbce6c1849a4a28fb3f4401ad039e.tar.bz2
API review cleanup.
Change-Id: Ieae7d450308b5637ed4253fe9baed3634c6ed141
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
-rw-r--r--libs/rs/rsAllocation.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 4ade714..fbb5ac9 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -848,9 +848,7 @@ RsAllocation rsaAllocationCreateFromBitmap(RsContext con, uint32_t w, uint32_t h
const Element *dst = static_cast<const Element *>(_dst);
//LOGE("%p rsi_AllocationCreateFromBitmap %i %i %i", rsc, w, h, genMips);
- RsDimension dims[] = {RS_DIMENSION_X, RS_DIMENSION_Y, RS_DIMENSION_LOD};
- uint32_t dimValues[] = {w, h, genMips};
- RsType type = rsaTypeCreate(rsc, _dst, 3, dims, dimValues);
+ RsType type = rsaTypeCreate(rsc, _dst, w, h, 0, genMips, false);
RsAllocation vTexAlloc = rsaAllocationCreateTyped(rsc, type);
Allocation *texAlloc = static_cast<Allocation *>(vTexAlloc);
@@ -888,9 +886,7 @@ RsAllocation rsaAllocationCubeCreateFromBitmap(RsContext con, uint32_t w, uint32
// Cubemap allocation's faces should be Width by Width each.
// Source data should have 6 * Width by Width pixels
// Error checking is done in the java layer
- RsDimension dims[] = {RS_DIMENSION_X, RS_DIMENSION_Y, RS_DIMENSION_LOD, RS_DIMENSION_FACE};
- uint32_t dimValues[] = {w, w, genMips, true};
- RsType type = rsaTypeCreate(rsc, _dst, 4, dims, dimValues);
+ RsType type = rsaTypeCreate(rsc, _dst, w, h, 0, genMips, true);
RsAllocation vTexAlloc = rsaAllocationCreateTyped(rsc, type);
Allocation *texAlloc = static_cast<Allocation *>(vTexAlloc);