From 92be2f74db81f0ed480b55c58cbde39270f9b772 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Tue, 19 Jun 2018 14:33:47 -0400 Subject: Revert "Revert "Change how vertex/instance attributes are handled in geometry processors."" This reverts commit 5045e501d2aec23e5f1e4b46346033ac3202c6b0. TBR=csmartdalton@google.com Change-Id: Ifbf5f1d8f8ef340fdc69653e931b6d68d4bf0854 Reviewed-on: https://skia-review.googlesource.com/135862 Reviewed-by: Brian Salomon Commit-Queue: Brian Salomon --- include/private/GrTypesPriv.h | 45 ------------------------------------------- 1 file changed, 45 deletions(-) (limited to 'include/private') diff --git a/include/private/GrTypesPriv.h b/include/private/GrTypesPriv.h index 5913a1e48c..e957f1f893 100644 --- a/include/private/GrTypesPriv.h +++ b/include/private/GrTypesPriv.h @@ -693,51 +693,6 @@ enum GrVertexAttribType { }; static const int kGrVertexAttribTypeCount = kLast_GrVertexAttribType + 1; -/** - * Returns the size of the attrib type in bytes. - */ -static inline size_t GrVertexAttribTypeSize(GrVertexAttribType type) { - switch (type) { - case kFloat_GrVertexAttribType: - return sizeof(float); - case kFloat2_GrVertexAttribType: - return 2 * sizeof(float); - case kFloat3_GrVertexAttribType: - return 3 * sizeof(float); - case kFloat4_GrVertexAttribType: - return 4 * sizeof(float); - case kHalf_GrVertexAttribType: - return sizeof(float); - case kHalf2_GrVertexAttribType: - return 2 * sizeof(float); - case kHalf3_GrVertexAttribType: - return 3 * sizeof(float); - case kHalf4_GrVertexAttribType: - return 4 * sizeof(float); - case kInt2_GrVertexAttribType: - return 2 * sizeof(int32_t); - case kInt3_GrVertexAttribType: - return 3 * sizeof(int32_t); - case kInt4_GrVertexAttribType: - return 4 * sizeof(int32_t); - case kUByte_norm_GrVertexAttribType: - return 1 * sizeof(char); - case kUByte4_norm_GrVertexAttribType: - return 4 * sizeof(char); - case kShort2_GrVertexAttribType: - return 2 * sizeof(int16_t); - case kUShort2_GrVertexAttribType: // fall through - case kUShort2_norm_GrVertexAttribType: - return 2 * sizeof(uint16_t); - case kInt_GrVertexAttribType: - return sizeof(int32_t); - case kUint_GrVertexAttribType: - return sizeof(uint32_t); - } - SK_ABORT("Unexpected attribute type"); - return 0; -} - /** * converts a GrVertexAttribType to a GrSLType */ -- cgit v1.2.3