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 /graphics | |
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 'graphics')
-rw-r--r-- | graphics/java/android/renderscript/FieldPacker.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/graphics/java/android/renderscript/FieldPacker.java b/graphics/java/android/renderscript/FieldPacker.java index f03b51c..24f0409 100644 --- a/graphics/java/android/renderscript/FieldPacker.java +++ b/graphics/java/android/renderscript/FieldPacker.java @@ -76,6 +76,7 @@ public class FieldPacker { public void addU8(short v) { if ((v < 0) || (v > 0xff)) { + android.util.Log.e("rs", "FieldPacker.addU8( " + v + " )"); throw new IllegalArgumentException("Saving value out of range for type"); } mData[mPos++] = (byte)v; @@ -83,6 +84,7 @@ public class FieldPacker { public void addU16(int v) { if ((v < 0) || (v > 0xffff)) { + android.util.Log.e("rs", "FieldPacker.addU16( " + v + " )"); throw new IllegalArgumentException("Saving value out of range for type"); } align(2); @@ -91,7 +93,8 @@ public class FieldPacker { } public void addU32(long v) { - if ((v < 0) || (v > 0xffffffff)) { + if ((v < 0) || (v > 0xffffffffL)) { + android.util.Log.e("rs", "FieldPacker.addU32( " + v + " )"); throw new IllegalArgumentException("Saving value out of range for type"); } align(4); @@ -103,6 +106,7 @@ public class FieldPacker { public void addU64(long v) { if (v < 0) { + android.util.Log.e("rs", "FieldPacker.addU64( " + v + " )"); throw new IllegalArgumentException("Saving value out of range for type"); } align(8); |