summaryrefslogtreecommitdiffstats
path: root/libs/rs/rsAllocation.cpp
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-08-11 10:30:44 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-08-11 10:30:44 -0700
commit2ce0e3ff30daeab43950513fdf12b72c0302d749 (patch)
treebad238dca578c1d9ee43aca62d2a2f69767aa0a5 /libs/rs/rsAllocation.cpp
parenta919112f4a68c5a929c68b0838011cdd55f8dca7 (diff)
downloadframeworks_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.cpp3
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;
}