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

Side by Side Diff: include/gpu/GrTestUtils.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 | « no previous file | include/gpu/GrTypesPriv.h » ('j') | 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 2015 Google Inc. 2 * Copyright 2015 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 GrTestUtils_DEFINED 8 #ifndef GrTestUtils_DEFINED
9 #define GrTestUtils_DEFINED 9 #define GrTestUtils_DEFINED
10 10
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 kAllOnes_CoverageMode, 84 kAllOnes_CoverageMode,
85 kRandom_CoverageMode, 85 kRandom_CoverageMode,
86 kLast_CoverageMode = kRandom_CoverageMode 86 kLast_CoverageMode = kRandom_CoverageMode
87 }; 87 };
88 88
89 CoverageMode colorMode = CoverageMode(random->nextULessThan(kLast_CoverageMo de + 1)); 89 CoverageMode colorMode = CoverageMode(random->nextULessThan(kLast_CoverageMo de + 1));
90 uint8_t coverage; 90 uint8_t coverage;
91 switch (colorMode) { 91 switch (colorMode) {
92 case kZero_CoverageMode: 92 case kZero_CoverageMode:
93 coverage = 0; 93 coverage = 0;
94 break;
94 case kAllOnes_CoverageMode: 95 case kAllOnes_CoverageMode:
95 coverage = 0xff; 96 coverage = 0xff;
96 break; 97 break;
97 case kRandom_CoverageMode: 98 case kRandom_CoverageMode:
98 coverage = random->nextULessThan(256); 99 coverage = random->nextULessThan(256);
99 break; 100 break;
100 } 101 }
101 return coverage; 102 return coverage;
102 } 103 }
103 104
104 #endif 105 #endif
105 #endif 106 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTypesPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698