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

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

Issue 762923003: Add support for half float alpha textures. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix config setup Created 6 years 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 | « src/core/SkHalf.h ('k') | src/gpu/gl/GrGLCaps.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 1086 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 "Alpha8", // kAlpha_8_GrPixelConfig, 1097 "Alpha8", // kAlpha_8_GrPixelConfig,
1098 "Index8", // kIndex_8_GrPixelConfig, 1098 "Index8", // kIndex_8_GrPixelConfig,
1099 "RGB565", // kRGB_565_GrPixelConfig, 1099 "RGB565", // kRGB_565_GrPixelConfig,
1100 "RGBA444", // kRGBA_4444_GrPixelConfig, 1100 "RGBA444", // kRGBA_4444_GrPixelConfig,
1101 "RGBA8888", // kRGBA_8888_GrPixelConfig, 1101 "RGBA8888", // kRGBA_8888_GrPixelConfig,
1102 "BGRA8888", // kBGRA_8888_GrPixelConfig, 1102 "BGRA8888", // kBGRA_8888_GrPixelConfig,
1103 "ETC1", // kETC1_GrPixelConfig, 1103 "ETC1", // kETC1_GrPixelConfig,
1104 "LATC", // kLATC_GrPixelConfig, 1104 "LATC", // kLATC_GrPixelConfig,
1105 "R11EAC", // kR11_EAC_GrPixelConfig, 1105 "R11EAC", // kR11_EAC_GrPixelConfig,
1106 "ASTC12x12",// kASTC_12x12_GrPixelConfig, 1106 "ASTC12x12",// kASTC_12x12_GrPixelConfig,
1107 "RGBAFloat", // kRGBA_float_GrPixelConfig 1107 "RGBAFloat",// kRGBA_float_GrPixelConfig
1108 "AlphaHalf",// kAlpha_half_GrPixelConfig
1108 }; 1109 };
1109 GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig); 1110 GR_STATIC_ASSERT(0 == kUnknown_GrPixelConfig);
1110 GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig); 1111 GR_STATIC_ASSERT(1 == kAlpha_8_GrPixelConfig);
1111 GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig); 1112 GR_STATIC_ASSERT(2 == kIndex_8_GrPixelConfig);
1112 GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig); 1113 GR_STATIC_ASSERT(3 == kRGB_565_GrPixelConfig);
1113 GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig); 1114 GR_STATIC_ASSERT(4 == kRGBA_4444_GrPixelConfig);
1114 GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig); 1115 GR_STATIC_ASSERT(5 == kRGBA_8888_GrPixelConfig);
1115 GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig); 1116 GR_STATIC_ASSERT(6 == kBGRA_8888_GrPixelConfig);
1116 GR_STATIC_ASSERT(7 == kETC1_GrPixelConfig); 1117 GR_STATIC_ASSERT(7 == kETC1_GrPixelConfig);
1117 GR_STATIC_ASSERT(8 == kLATC_GrPixelConfig); 1118 GR_STATIC_ASSERT(8 == kLATC_GrPixelConfig);
1118 GR_STATIC_ASSERT(9 == kR11_EAC_GrPixelConfig); 1119 GR_STATIC_ASSERT(9 == kR11_EAC_GrPixelConfig);
1119 GR_STATIC_ASSERT(10 == kASTC_12x12_GrPixelConfig); 1120 GR_STATIC_ASSERT(10 == kASTC_12x12_GrPixelConfig);
1120 GR_STATIC_ASSERT(11 == kRGBA_float_GrPixelConfig); 1121 GR_STATIC_ASSERT(11 == kRGBA_float_GrPixelConfig);
1122 GR_STATIC_ASSERT(12 == kAlpha_half_GrPixelConfig);
1121 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kConfigNames) == kGrPixelConfigCnt); 1123 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kConfigNames) == kGrPixelConfigCnt);
1122 1124
1123 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][0]); 1125 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][0]);
1124 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][1]); 1126 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][1]);
1125 1127
1126 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1128 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1127 r.appendf("%s is renderable: %s, with MSAA: %s\n", 1129 r.appendf("%s is renderable: %s, with MSAA: %s\n",
1128 kConfigNames[i], 1130 kConfigNames[i],
1129 gNY[fConfigRenderSupport[i][0]], 1131 gNY[fConfigRenderSupport[i][0]],
1130 gNY[fConfigRenderSupport[i][1]]); 1132 gNY[fConfigRenderSupport[i][1]]);
(...skipping 26 matching lines...) Expand all
1157 GrDrawState::AutoRestoreStencil* ars, 1159 GrDrawState::AutoRestoreStencil* ars,
1158 GrDrawState* ds, 1160 GrDrawState* ds,
1159 GrClipMaskManager::ScissorState* scissorState) { 1161 GrClipMaskManager::ScissorState* scissorState) {
1160 return fClipMaskManager.setupClipping(ds, 1162 return fClipMaskManager.setupClipping(ds,
1161 are, 1163 are,
1162 ars, 1164 ars,
1163 scissorState, 1165 scissorState,
1164 this->getClip(), 1166 this->getClip(),
1165 devBounds); 1167 devBounds);
1166 } 1168 }
OLDNEW
« no previous file with comments | « src/core/SkHalf.h ('k') | src/gpu/gl/GrGLCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698