summaryrefslogtreecommitdiff
path: root/libs/rs/rsAllocation.cpp
diff options
context:
space:
mode:
author Jason Sams <rjsams@android.com> 2009-08-09 17:01:55 -0700
committer Jason Sams <rjsams@android.com> 2009-08-09 17:05:13 -0700
commit1bada8cd6e4f340de93cff4a2439835fc3b1456c (patch)
treebdc1ed59f9b9ef531bca7220550a025a89ca4173 /libs/rs/rsAllocation.cpp
parent467f3df13dc9324b35c139bd6d291265015ba4d3 (diff)
Begin implementing SimpleMesh and fix some bugs with refcounting and java object destruction tracking.
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
-rw-r--r--libs/rs/rsAllocation.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp
index ecfbf83778ac..5ec73d74ac89 100644
--- a/libs/rs/rsAllocation.cpp
+++ b/libs/rs/rsAllocation.cpp
@@ -41,11 +41,11 @@ Allocation::Allocation(const Type *type)
mBufferID = 0;
mType.set(type);
+ rsAssert(type);
mPtr = malloc(mType->getSizeBytes());
if (!mPtr) {
LOGE("Allocation::Allocation, alloc failure");
}
-
}
Allocation::~Allocation()
@@ -114,6 +114,7 @@ void Allocation::uploadToBufferObject()
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
+
void Allocation::data(const void *data)
{
memcpy(mPtr, data, mType->getSizeBytes());