diff options
| author | Alex Sakhartchouk <alexst@google.com> | 2010-08-11 10:30:44 -0700 |
|---|---|---|
| committer | Alex Sakhartchouk <alexst@google.com> | 2010-08-11 10:30:44 -0700 |
| commit | 2ce0e3ff30daeab43950513fdf12b72c0302d749 (patch) | |
| tree | bad238dca578c1d9ee43aca62d2a2f69767aa0a5 /libs/rs/rsAllocation.cpp | |
| parent | a919112f4a68c5a929c68b0838011cdd55f8dca7 (diff) | |
| download | frameworks_base-2ce0e3ff30daeab43950513fdf12b72c0302d749.zip frameworks_base-2ce0e3ff30daeab43950513fdf12b72c0302d749.tar.gz frameworks_base-2ce0e3ff30daeab43950513fdf12b72c0302d749.tar.bz2 | |
Adding allocation reference counting to the a3d models.
Change-Id: I225b431d09bfebbebf49df75b7df5e4d5961a564
Diffstat (limited to 'libs/rs/rsAllocation.cpp')
| -rw-r--r-- | libs/rs/rsAllocation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/rs/rsAllocation.cpp b/libs/rs/rsAllocation.cpp index d62fa55..7d31bd6 100644 --- a/libs/rs/rsAllocation.cpp +++ b/libs/rs/rsAllocation.cpp @@ -391,7 +391,8 @@ Allocation *Allocation::createFromStream(Context *rsc, IStream *stream) alloc->setName(name.string(), name.size()); // Read in all of our allocation data - stream->loadByteArray(alloc->getPtr(), dataSize); + alloc->data(stream->getPtr() + stream->getPos(), dataSize); + stream->reset(stream->getPos() + dataSize); return alloc; } |
