summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsAllocation.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-12-06 22:10:18 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-12-06 22:10:18 -0800
commit0252a7ebd44da1960ba6cf1e1f6b8b030c9e57f1 (patch)
tree42458ae05441e6a02678707d73780179c5ad96f1 /libs/rs/rsAllocation.cpp
parentde0ca31e88b0e2a1dd65e8b8d501614a5e4f0930 (diff)
parentbf6ef8d78fffbce6c1849a4a28fb3f4401ad039e (diff)
downloadframeworks_base-0252a7ebd44da1960ba6cf1e1f6b8b030c9e57f1.zip
frameworks_base-0252a7ebd44da1960ba6cf1e1f6b8b030c9e57f1.tar.gz
frameworks_base-0252a7ebd44da1960ba6cf1e1f6b8b030c9e57f1.tar.bz2
Merge "API review cleanup."
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);