Async type creation.
Change-Id: I4d98446fabbf7e8a98c97f85b573a58c8a0c58c2
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index 172d07d..775fdf7 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -794,13 +794,9 @@
const Element *dst = static_cast<const Element *>(_dst);
//LOGE("%p rsi_AllocationCreateFromBitmap %i %i %i", rsc, w, h, genMips);
- rsi_TypeBegin(rsc, _dst);
- rsi_TypeAdd(rsc, RS_DIMENSION_X, w);
- rsi_TypeAdd(rsc, RS_DIMENSION_Y, h);
- if (genMips) {
- rsi_TypeAdd(rsc, RS_DIMENSION_LOD, 1);
- }
- RsType type = rsi_TypeCreate(rsc);
+ 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);
RsAllocation vTexAlloc = rsi_AllocationCreateTyped(rsc, type);
Allocation *texAlloc = static_cast<Allocation *>(vTexAlloc);