From 3b9c52ab8c1ab240d2299358d01a8efbe392d111 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Thu, 14 Oct 2010 17:48:46 -0700 Subject: Async type creation. Change-Id: I4d98446fabbf7e8a98c97f85b573a58c8a0c58c2 --- libs/rs/rsAllocation.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'libs/rs/rsAllocation.cpp') 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(_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(vTexAlloc); -- cgit v1.2.3-59-g8ed1b