Add convenient Type creator, alignment define, and fix USAGE_SHARED issue.
Change-Id: Ib344ed27feee95c9eddf4f58468ef3e29fdfabab
diff --git a/cpp/rsCppStructs.h b/cpp/rsCppStructs.h
index 46eb336..f5bfd0c 100644
--- a/cpp/rsCppStructs.h
+++ b/cpp/rsCppStructs.h
@@ -23,6 +23,10 @@
#include <rs.h>
+// Every row in an RS allocation is guaranteed to be aligned by this amount
+// Every row in a user-backed allocation must be aligned by this amount
+#define RS_CPU_ALLOCATION_ALIGNMENT 16
+
namespace android {
namespace RSC {
@@ -541,6 +545,7 @@
Type(void *id, sp<RS> rs);
+ static sp<const Type> create(sp<RS> rs, sp<const Element> e, uint32_t dimX, uint32_t dimY, uint32_t dimZ);
class Builder {
protected: