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

Side by Side Diff: src/gpu/GrDrawTarget.cpp

Issue 330763008: Add R11 EAC pixel config (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Finding the size should be easy to do Created 6 years, 5 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/GrTypes.h ('k') | src/gpu/GrTexture.cpp » ('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 1116 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 }
OLDNEW
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698