diff options
| author | Jason Sams <rjsams@android.com> | 2010-08-12 12:44:02 -0700 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-08-12 12:47:04 -0700 |
| commit | ee73498ddf896f6ed003e9ce1fab87aefda90173 (patch) | |
| tree | e7695920638136e1cbdfbeade8cfb78b4fe8bfce /libs/rs/rsAllocation.cpp | |
| parent | 5320b326a48a473f58d0e99a81d75f277254b958 (diff) | |
| download | frameworks_base-ee73498ddf896f6ed003e9ce1fab87aefda90173.zip frameworks_base-ee73498ddf896f6ed003e9ce1fab87aefda90173.tar.gz frameworks_base-ee73498ddf896f6ed003e9ce1fab87aefda90173.tar.bz2 | |
Fix field packer bug for U32 data.
Fix initial refcounts in allocations.
Support null references in allocations.
Change-Id: Ifba6406ba750e69737bd77fa7df5d7fb8e27a5b4
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
| -rw-r--r-- | libs/rs/rsAllocation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index 7d31bd6..7e44fea 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -34,6 +34,9 @@ Allocation::Allocation(Context *rsc, const Type *type) : ObjectBase(rsc) init(rsc, type); mPtr = malloc(mType->getSizeBytes()); + if (mType->getElement()->getHasReferences()) { + memset(mPtr, 0, mType->getSizeBytes()); + } if (!mPtr) { LOGE("Allocation::Allocation, alloc failure"); } |
