OLD | NEW |
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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1127 static const char* kConfigNames[] = { | 1127 static const char* kConfigNames[] = { |
1128 "Unknown", // kUnknown_GrPixelConfig | 1128 "Unknown", // kUnknown_GrPixelConfig |
1129 "Alpha8", // kAlpha_8_GrPixelConfig, | 1129 "Alpha8", // kAlpha_8_GrPixelConfig, |
1130 "Index8", // kIndex_8_GrPixelConfig, | 1130 "Index8", // kIndex_8_GrPixelConfig, |
1131 "RGB565", // kRGB_565_GrPixelConfig, | 1131 "RGB565", // kRGB_565_GrPixelConfig, |
1132 "RGBA444", // kRGBA_4444_GrPixelConfig, | 1132 "RGBA444", // kRGBA_4444_GrPixelConfig, |
1133 "RGBA8888", // kRGBA_8888_GrPixelConfig, | 1133 "RGBA8888", // kRGBA_8888_GrPixelConfig, |
1134 "BGRA8888", // kBGRA_8888_GrPixelConfig, | 1134 "BGRA8888", // kBGRA_8888_GrPixelConfig, |
1135 "ETC1", // kETC1_GrPixelConfig, | 1135 "ETC1", // kETC1_GrPixelConfig, |
1136 "LATC", // kLATC_GrPixelConfig, | 1136 "LATC", // kLATC_GrPixelConfig, |
| 1137 "R11EAC", // kR11_EAC_GrPixelConfig, |
1137 }; | 1138 }; |
1138 GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig); | 1139 GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig); |
1139 GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig); | 1140 GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig); |
1140 GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig); | 1141 GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig); |
1141 GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig); | 1142 GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig); |
1142 GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig); | 1143 GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig); |
1143 GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig); | 1144 GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig); |
1144 GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig); | 1145 GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig); |
1145 GR_STATIC_ASSERT(7 == kETC1_GrPixelConfig); | 1146 GR_STATIC_ASSERT(7 == kETC1_GrPixelConfig); |
1146 GR_STATIC_ASSERT(8 == kLATC_GrPixelConfig); | 1147 GR_STATIC_ASSERT(8 == kLATC_GrPixelConfig); |
| 1148 GR_STATIC_ASSERT(9 == kR11_EAC_GrPixelConfig); |
1147 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kConfigNames) == kGrPixelConfigCnt); | 1149 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kConfigNames) == kGrPixelConfigCnt); |
1148 | 1150 |
1149 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][0]); | 1151 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][0]); |
1150 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][1]); | 1152 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][1]); |
1151 | 1153 |
1152 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 1154 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
1153 r.appendf("%s is renderable: %s, with MSAA: %s\n", | 1155 r.appendf("%s is renderable: %s, with MSAA: %s\n", |
1154 kConfigNames[i], | 1156 kConfigNames[i], |
1155 gNY[fConfigRenderSupport[i][0]], | 1157 gNY[fConfigRenderSupport[i][0]], |
1156 gNY[fConfigRenderSupport[i][1]]); | 1158 gNY[fConfigRenderSupport[i][1]]); |
1157 } | 1159 } |
1158 | 1160 |
1159 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); | 1161 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); |
1160 | 1162 |
1161 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 1163 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
1162 r.appendf("%s is uploadable to a texture: %s\n", | 1164 r.appendf("%s is uploadable to a texture: %s\n", |
1163 kConfigNames[i], | 1165 kConfigNames[i], |
1164 gNY[fConfigTextureSupport[i]]); | 1166 gNY[fConfigTextureSupport[i]]); |
1165 } | 1167 } |
1166 | 1168 |
1167 return r; | 1169 return r; |
1168 } | 1170 } |
OLD | NEW |