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

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

Issue 304743004: Move ETC1 and LATC enums value to GrPixelConfig (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Only generate mipmaps for uncompressed textures. Created 6 years, 6 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/GrTypes.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 static inline uint32_t GrPixelConfigComponentMask(GrPixelConfig config) { 125 static inline uint32_t GrPixelConfigComponentMask(GrPixelConfig config) {
126 SkASSERT(config >= 0 && config < kGrPixelConfigCnt); 126 SkASSERT(config >= 0 && config < kGrPixelConfigCnt);
127 static const uint32_t kFlags[] = { 127 static const uint32_t kFlags[] = {
128 0, // kUnknown_GrPixelConfig 128 0, // kUnknown_GrPixelConfig
129 kA_GrColorComponentFlag, // kAlpha_8_GrPixelConfig 129 kA_GrColorComponentFlag, // kAlpha_8_GrPixelConfig
130 kRGBA_GrColorComponentFlags, // kIndex_8_GrPixelConfig 130 kRGBA_GrColorComponentFlags, // kIndex_8_GrPixelConfig
131 kRGB_GrColorComponentFlags, // kRGB_565_GrPixelConfig 131 kRGB_GrColorComponentFlags, // kRGB_565_GrPixelConfig
132 kRGBA_GrColorComponentFlags, // kRGBA_4444_GrPixelConfig 132 kRGBA_GrColorComponentFlags, // kRGBA_4444_GrPixelConfig
133 kRGBA_GrColorComponentFlags, // kRGBA_8888_GrPixelConfig 133 kRGBA_GrColorComponentFlags, // kRGBA_8888_GrPixelConfig
134 kRGBA_GrColorComponentFlags, // kBGRA_8888_GrPixelConfig 134 kRGBA_GrColorComponentFlags, // kBGRA_8888_GrPixelConfig
135 kRGB_GrColorComponentFlags, // kETC1_GrPixelConfig
136 kA_GrColorComponentFlag, // kLATC_GrPixelConfig
135 }; 137 };
136 return kFlags[config]; 138 return kFlags[config];
137 139
138 GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig); 140 GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig);
139 GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig); 141 GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig);
140 GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig); 142 GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig);
141 GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig); 143 GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig);
142 GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig); 144 GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig);
143 GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig); 145 GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig);
144 GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig); 146 GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig);
147 GR_STATIC_ASSERT(7 == kETC1_GrPixelConfig);
148 GR_STATIC_ASSERT(8 == kLATC_GrPixelConfig);
145 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kFlags) == kGrPixelConfigCnt); 149 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kFlags) == kGrPixelConfigCnt);
146 } 150 }
147 151
148 #endif 152 #endif
OLDNEW
« no previous file with comments | « no previous file | include/gpu/GrTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698