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

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

Issue 307543002: Revert of Add compressed texture capabilities for GPU devices (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « include/gpu/GrTypes.h ('k') | src/gpu/GrDrawTargetCaps.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 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after
1022 fReuseScratchTextures = true; 1022 fReuseScratchTextures = true;
1023 fGpuTracingSupport = false; 1023 fGpuTracingSupport = false;
1024 1024
1025 fMapBufferFlags = kNone_MapFlags; 1025 fMapBufferFlags = kNone_MapFlags;
1026 1026
1027 fMaxRenderTargetSize = 0; 1027 fMaxRenderTargetSize = 0;
1028 fMaxTextureSize = 0; 1028 fMaxTextureSize = 0;
1029 fMaxSampleCount = 0; 1029 fMaxSampleCount = 0;
1030 1030
1031 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 1031 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
1032 memset(fCompressedFormatSupport, 0, sizeof(fCompressedFormatSupport));
1033 } 1032 }
1034 1033
1035 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { 1034 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
1036 f8BitPaletteSupport = other.f8BitPaletteSupport; 1035 f8BitPaletteSupport = other.f8BitPaletteSupport;
1037 fMipMapSupport = other.fMipMapSupport; 1036 fMipMapSupport = other.fMipMapSupport;
1038 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; 1037 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport;
1039 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; 1038 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport;
1040 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport; 1039 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport;
1041 fHWAALineSupport = other.fHWAALineSupport; 1040 fHWAALineSupport = other.fHWAALineSupport;
1042 fShaderDerivativeSupport = other.fShaderDerivativeSupport; 1041 fShaderDerivativeSupport = other.fShaderDerivativeSupport;
1043 fGeometryShaderSupport = other.fGeometryShaderSupport; 1042 fGeometryShaderSupport = other.fGeometryShaderSupport;
1044 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport; 1043 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport;
1045 fPathRenderingSupport = other.fPathRenderingSupport; 1044 fPathRenderingSupport = other.fPathRenderingSupport;
1046 fDstReadInShaderSupport = other.fDstReadInShaderSupport; 1045 fDstReadInShaderSupport = other.fDstReadInShaderSupport;
1047 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport; 1046 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport;
1048 fReuseScratchTextures = other.fReuseScratchTextures; 1047 fReuseScratchTextures = other.fReuseScratchTextures;
1049 fGpuTracingSupport = other.fGpuTracingSupport; 1048 fGpuTracingSupport = other.fGpuTracingSupport;
1050 1049
1051 fMapBufferFlags = other.fMapBufferFlags; 1050 fMapBufferFlags = other.fMapBufferFlags;
1052 1051
1053 fMaxRenderTargetSize = other.fMaxRenderTargetSize; 1052 fMaxRenderTargetSize = other.fMaxRenderTargetSize;
1054 fMaxTextureSize = other.fMaxTextureSize; 1053 fMaxTextureSize = other.fMaxTextureSize;
1055 fMaxSampleCount = other.fMaxSampleCount; 1054 fMaxSampleCount = other.fMaxSampleCount;
1056 1055
1057 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende rSupport)); 1056 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende rSupport));
1058 memcpy(fCompressedFormatSupport, other.fCompressedFormatSupport,
1059 sizeof(fCompressedFormatSupport));
1060 1057
1061 return *this; 1058 return *this;
1062 } 1059 }
1063 1060
1064 static SkString map_flags_to_string(uint32_t flags) { 1061 static SkString map_flags_to_string(uint32_t flags) {
1065 SkString str; 1062 SkString str;
1066 if (GrDrawTargetCaps::kNone_MapFlags == flags) { 1063 if (GrDrawTargetCaps::kNone_MapFlags == flags) {
1067 str = "none"; 1064 str = "none";
1068 } else { 1065 } else {
1069 SkASSERT(GrDrawTargetCaps::kCanMap_MapFlag & flags); 1066 SkASSERT(GrDrawTargetCaps::kCanMap_MapFlag & flags);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][0]); 1122 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][0]);
1126 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][1]); 1123 SkASSERT(!fConfigRenderSupport[kUnknown_GrPixelConfig][1]);
1127 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1124 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1128 if (i != kUnknown_GrPixelConfig) { 1125 if (i != kUnknown_GrPixelConfig) {
1129 r.appendf("%s is renderable: %s, with MSAA: %s\n", 1126 r.appendf("%s is renderable: %s, with MSAA: %s\n",
1130 kConfigNames[i], 1127 kConfigNames[i],
1131 gNY[fConfigRenderSupport[i][0]], 1128 gNY[fConfigRenderSupport[i][0]],
1132 gNY[fConfigRenderSupport[i][1]]); 1129 gNY[fConfigRenderSupport[i][1]]);
1133 } 1130 }
1134 } 1131 }
1135
1136 static const char* kCompressedFormatNames[] = {
1137 "ETC1", // kETC1_GrCompressedFormat
1138 "ETC2", // kETC2_GrCompressedFormat,
1139 "DXT1", // kDXT1_GrCompressedFormat,
1140 };
1141 GR_STATIC_ASSERT(0 == kETC1_GrCompressedFormat);
1142 GR_STATIC_ASSERT(1 == kETC2_GrCompressedFormat);
1143 GR_STATIC_ASSERT(2 == kDXT1_GrCompressedFormat);
1144 GR_STATIC_ASSERT(SK_ARRAY_COUNT(kCompressedFormatNames) == kGrCompressedForm atCount);
1145
1146 for (size_t i = 0; i < SK_ARRAY_COUNT(kCompressedFormatNames); ++i) {
1147 r.appendf("%s Compressed Texture Support: %s\n",
1148 kCompressedFormatNames[i],
1149 gNY[fCompressedFormatSupport[i]]);
1150 }
1151
1152 return r; 1132 return r;
1153 } 1133 }
OLDNEW
« no previous file with comments | « include/gpu/GrTypes.h ('k') | src/gpu/GrDrawTargetCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698