| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrTypesPriv_DEFINED | 8 #ifndef GrTypesPriv_DEFINED |
| 9 #define GrTypesPriv_DEFINED | 9 #define GrTypesPriv_DEFINED |
| 10 | 10 |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kSizes) == kGrVertexAttribTypeCount); | 171 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kSizes) == kGrVertexAttribTypeCount); |
| 172 } | 172 } |
| 173 | 173 |
| 174 /** | 174 /** |
| 175 * converts a GrVertexAttribType to a GrSLType | 175 * converts a GrVertexAttribType to a GrSLType |
| 176 */ | 176 */ |
| 177 static inline GrSLType GrVertexAttribTypeToSLType(GrVertexAttribType type) { | 177 static inline GrSLType GrVertexAttribTypeToSLType(GrVertexAttribType type) { |
| 178 switch (type) { | 178 switch (type) { |
| 179 default: | 179 default: |
| 180 SkFAIL("Unsupported type conversion"); | 180 SkFAIL("Unsupported type conversion"); |
| 181 return kVoid_GrSLType; |
| 181 case kUByte_GrVertexAttribType: | 182 case kUByte_GrVertexAttribType: |
| 182 case kFloat_GrVertexAttribType: | 183 case kFloat_GrVertexAttribType: |
| 183 return kFloat_GrSLType; | 184 return kFloat_GrSLType; |
| 184 case kVec2s_GrVertexAttribType: | 185 case kVec2s_GrVertexAttribType: |
| 185 case kVec2f_GrVertexAttribType: | 186 case kVec2f_GrVertexAttribType: |
| 186 return kVec2f_GrSLType; | 187 return kVec2f_GrSLType; |
| 187 case kVec3f_GrVertexAttribType: | 188 case kVec3f_GrVertexAttribType: |
| 188 return kVec3f_GrSLType; | 189 return kVec3f_GrSLType; |
| 189 case kVec4ub_GrVertexAttribType: | 190 case kVec4ub_GrVertexAttribType: |
| 190 case kVec4f_GrVertexAttribType: | 191 case kVec4f_GrVertexAttribType: |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // Takes a pointer to a GrCaps, and will suppress prints if required | 272 // Takes a pointer to a GrCaps, and will suppress prints if required |
| 272 #define GrCapsDebugf(caps, ...) \ | 273 #define GrCapsDebugf(caps, ...) \ |
| 273 if (!caps->suppressPrints()) { \ | 274 if (!caps->suppressPrints()) { \ |
| 274 SkDebugf(__VA_ARGS__); \ | 275 SkDebugf(__VA_ARGS__); \ |
| 275 } | 276 } |
| 276 #else | 277 #else |
| 277 #define GrCapsDebugf(caps, ...) | 278 #define GrCapsDebugf(caps, ...) |
| 278 #endif | 279 #endif |
| 279 | 280 |
| 280 #endif | 281 #endif |
| OLD | NEW |