Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1008)

Side by Side Diff: include/gpu/GrTypesPriv.h

Issue 1549273002: Take care fall-through case of switch in skia (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/gpu/GrTestUtils.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « include/gpu/GrTestUtils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698