summaryrefslogtreecommitdiff
path: root/libs/rs/rsAllocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
-rw-r--r--libs/rs/rsAllocation.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index cb0022377bc5..77e80320b372 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -31,10 +31,13 @@
using namespace android;
using namespace android::renderscript;
-Allocation::Allocation(Context *rsc, const Type *type, uint32_t usages) : ObjectBase(rsc) {
+Allocation::Allocation(Context *rsc, const Type *type, uint32_t usages,
+ RsAllocationMipmapControl mc)
+ : ObjectBase(rsc) {
init(rsc, type);
mUsageFlags = usages;
+ mMipmapControl = mc;
allocScriptMemory();
if (mType->getElement()->getHasReferences()) {
@@ -795,7 +798,7 @@ RsAllocation rsaAllocationCreateTyped(RsContext con, RsType vtype,
RsAllocationMipmapControl mips,
uint32_t usages) {
Context *rsc = static_cast<Context *>(con);
- Allocation * alloc = new Allocation(rsc, static_cast<Type *>(vtype), usages);
+ Allocation * alloc = new Allocation(rsc, static_cast<Type *>(vtype), usages, mips);
alloc->incUserRef();
return alloc;
}