1. Reorder DataTypeBoolean, DataTypeRSMatrix2x2, DataTypeRSMatrix3x3, and DataTypeRSMatrix4x4 in RSExportPrimitiveType::DataType.
2. Refine the RSExportPrimitiveType::DataKind.
Change-Id: Ida0849e68b00571e0f055089ccc5a46d26760390
diff --git a/slang_rs_export_element.cpp b/slang_rs_export_element.cpp
index aecadcf..a5375f8 100644
--- a/slang_rs_export_element.cpp
+++ b/slang_rs_export_element.cpp
@@ -150,18 +150,16 @@
const clang::Type* CT = GET_CANONICAL_TYPE(T);
const ElementInfo* EI = NULL;
- // For rs element that's NOT like those rs_color4f..., just call
- // Create(Context, T) without finding EI.
- // Note: Those rs_color4f kind of elements are either typed primitive or
- // vector
+ // Note: RS element like rs_pixel_rgb elements are either in the type of
+ // primitive or vector.
if ((CT->getTypeClass() != clang::Type::Builtin) &&
(CT->getTypeClass() != clang::Type::ExtVector) &&
(CT->getTypeClass() != clang::Type::Record)) {
return RSExportType::Create(Context, T);
}
- // Iterative query the name of type to see whether it's an element name
- // like rs_color4f or its alias (via typedef).
+ // Following the typedef chain to see whether it's an element name like
+ // rs_pixel_rgb or its alias (via typedef).
while (T != CT) {
if (T->getTypeClass() != clang::Type::Typedef) {
break;