diff options
| author | 2010-10-14 17:52:31 -0700 | |
|---|---|---|
| committer | 2010-10-14 17:52:31 -0700 | |
| commit | c900a79b95e357b0746b1816e3c68bbd3ed9ea78 (patch) | |
| tree | 7ad682c1939d718cd919a3f6076b2e1e9a7f0537 /libs/rs/rsAllocation.cpp | |
| parent | 9ba608331e0f8444c8397cffa930ca20c60f1a7a (diff) | |
| parent | 3b9c52ab8c1ab240d2299358d01a8efbe392d111 (diff) | |
Merge "Async type creation."
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
| -rw-r--r-- | libs/rs/rsAllocation.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 172d07d2291a..775fdf70016e 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -794,13 +794,9 @@ RsAllocation rsi_AllocationCreateFromBitmap(Context *rsc, 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); - 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); |