summaryrefslogtreecommitdiffstats
path: root/rsStream.h
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2010-06-04 10:06:50 -0700
committerAlex Sakhartchouk <alexst@google.com>2010-06-04 10:06:50 -0700
commitb825f67adb5d1e1751fe108e6dbf9c6f2555c283 (patch)
tree654cae2dc222f2249c9aab4f6b9d054f904e37da /rsStream.h
parent976e2830d50c6dae3b55eac1d7e5fe7243cbdc0f (diff)
downloadandroid_frameworks_rs-b825f67adb5d1e1751fe108e6dbf9c6f2555c283.tar.gz
android_frameworks_rs-b825f67adb5d1e1751fe108e6dbf9c6f2555c283.tar.bz2
android_frameworks_rs-b825f67adb5d1e1751fe108e6dbf9c6f2555c283.zip
Creating the jni and java layer to integrate a3d
Change-Id: I438359633bae59bf9188cd2c4664a92ca16c5f37
Diffstat (limited to 'rsStream.h')
-rw-r--r--rsStream.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/rsStream.h b/rsStream.h
index 5ccd6ca5..d401cd12 100644
--- a/rsStream.h
+++ b/rsStream.h
@@ -86,6 +86,13 @@ public:
OStream(uint64_t length, bool use64);
~OStream();
+ void align(uint32_t bytes) {
+ mPos = (mPos + (bytes - 1)) & (~(bytes - 1));
+ if(mPos >= mLength) {
+ growSize();
+ }
+ }
+
void addF(float v) {
uint32_t uintV = *reinterpret_cast<uint32_t*> (&v);
addU32(uintV);