Returns the size of the attrib type in bytes. This was moved from include/private/gpu/ganesh/GrTypesPriv.h in service of Skia dependents that build with C++11.
504 {
507 return sizeof(
float);
509 return 2 *
sizeof(
float);
511 return 3 *
sizeof(
float);
513 return 4 *
sizeof(
float);
515 return sizeof(uint16_t);
517 return 2 * sizeof(uint16_t);
519 return 4 * sizeof(uint16_t);
521 return 2 * sizeof(int32_t);
523 return 3 * sizeof(int32_t);
525 return 4 * sizeof(int32_t);
527 return 1 * sizeof(char);
529 return 2 * sizeof(char);
531 return 4 * sizeof(char);
533 return 1 * sizeof(char);
535 return 2 * sizeof(char);
537 return 4 * sizeof(char);
539 return 1 * sizeof(char);
541 return 4 * sizeof(char);
543 return 2 * sizeof(int16_t);
545 return 4 * sizeof(int16_t);
548 return 2 * sizeof(uint16_t);
550 return sizeof(int32_t);
552 return sizeof(uint32_t);
554 return sizeof(uint16_t);
556 return 4 * sizeof(uint16_t);
557 }
558
559
560#if defined(__clang__) || !defined(__GNUC__)
561 SK_ABORT(
"Unsupported type conversion");
562#endif
563 return 0;
564}
@ kUShort_norm_GrVertexAttribType
@ kFloat2_GrVertexAttribType
@ kUShort2_GrVertexAttribType
@ kUInt_GrVertexAttribType
@ kUByte4_norm_GrVertexAttribType
@ kUByte_GrVertexAttribType
@ kShort2_GrVertexAttribType
@ kUShort4_norm_GrVertexAttribType
@ kInt_GrVertexAttribType
@ kByte_GrVertexAttribType
@ kByte4_GrVertexAttribType
@ kFloat3_GrVertexAttribType
@ kFloat_GrVertexAttribType
@ kByte2_GrVertexAttribType
@ kFloat4_GrVertexAttribType
@ kShort4_GrVertexAttribType
@ kUShort2_norm_GrVertexAttribType
@ kInt3_GrVertexAttribType
@ kHalf2_GrVertexAttribType
@ kHalf4_GrVertexAttribType
@ kUByte4_GrVertexAttribType
@ kUByte2_GrVertexAttribType
@ kInt4_GrVertexAttribType
@ kUByte_norm_GrVertexAttribType
@ kInt2_GrVertexAttribType
@ kHalf_GrVertexAttribType
#define SK_ABORT(message,...)