diff options
author | Jason Sams <jsams@google.com> | 2014-06-18 13:17:57 -0700 |
---|---|---|
committer | Jason Sams <jsams@google.com> | 2014-06-18 13:17:57 -0700 |
commit | b49dfeaea96375b3b8fc1921f8b891c340f0baf2 (patch) | |
tree | c4a30f9ad69212d246da1677404cbc90f16d0867 /rs/java | |
parent | 88b37edaeab7b31cab0f5115e5c9f63a49991408 (diff) | |
download | frameworks_base-b49dfeaea96375b3b8fc1921f8b891c340f0baf2.zip frameworks_base-b49dfeaea96375b3b8fc1921f8b891c340f0baf2.tar.gz frameworks_base-b49dfeaea96375b3b8fc1921f8b891c340f0baf2.tar.bz2 |
Fix element size on 64b
RenderScript Element types know their own size. This
change properly tracks the new object sizes.
Change-Id: I3cbf76a7ec5f68056ed5599e9406cea05ba86969
Diffstat (limited to 'rs/java')
-rw-r--r-- | rs/java/android/renderscript/Element.java | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/rs/java/android/renderscript/Element.java b/rs/java/android/renderscript/Element.java index aa5d687..f2f1c86 100644 --- a/rs/java/android/renderscript/Element.java +++ b/rs/java/android/renderscript/Element.java @@ -143,17 +143,17 @@ public class Element extends BaseObj { MATRIX_3X3 (17, 36), MATRIX_2X2 (18, 16), - RS_ELEMENT (1000, 4), - RS_TYPE (1001, 4), - RS_ALLOCATION (1002, 4), - RS_SAMPLER (1003, 4), - RS_SCRIPT (1004, 4), - RS_MESH (1005, 4), - RS_PROGRAM_FRAGMENT (1006, 4), - RS_PROGRAM_VERTEX (1007, 4), - RS_PROGRAM_RASTER (1008, 4), - RS_PROGRAM_STORE (1009, 4), - RS_FONT (1010, 4); + RS_ELEMENT (1000), + RS_TYPE (1001), + RS_ALLOCATION (1002), + RS_SAMPLER (1003), + RS_SCRIPT (1004), + RS_MESH (1005), + RS_PROGRAM_FRAGMENT (1006), + RS_PROGRAM_VERTEX (1007), + RS_PROGRAM_RASTER (1008), + RS_PROGRAM_STORE (1009), + RS_FONT (1010); int mID; int mSize; @@ -161,6 +161,14 @@ public class Element extends BaseObj { mID = id; mSize = size; } + + DataType(int id) { + mID = id; + mSize = 4; + if (RenderScript.sPointerSize == 8) { + mSize = 32; + } + } } /** |