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

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

Issue 430773004: Add query for whether or not we have compressedTexSubImage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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 | 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 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 fStencilWrapOpsSupport = false; 1015 fStencilWrapOpsSupport = false;
1016 fHWAALineSupport = false; 1016 fHWAALineSupport = false;
1017 fShaderDerivativeSupport = false; 1017 fShaderDerivativeSupport = false;
1018 fGeometryShaderSupport = false; 1018 fGeometryShaderSupport = false;
1019 fDualSourceBlendingSupport = false; 1019 fDualSourceBlendingSupport = false;
1020 fPathRenderingSupport = false; 1020 fPathRenderingSupport = false;
1021 fDstReadInShaderSupport = false; 1021 fDstReadInShaderSupport = false;
1022 fDiscardRenderTargetSupport = false; 1022 fDiscardRenderTargetSupport = false;
1023 fReuseScratchTextures = true; 1023 fReuseScratchTextures = true;
1024 fGpuTracingSupport = false; 1024 fGpuTracingSupport = false;
1025 fCompressedTexSubImageSupport = false;
1025 1026
1026 fMapBufferFlags = kNone_MapFlags; 1027 fMapBufferFlags = kNone_MapFlags;
1027 1028
1028 fMaxRenderTargetSize = 0; 1029 fMaxRenderTargetSize = 0;
1029 fMaxTextureSize = 0; 1030 fMaxTextureSize = 0;
1030 fMaxSampleCount = 0; 1031 fMaxSampleCount = 0;
1031 1032
1032 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); 1033 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport));
1033 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); 1034 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport));
1034 } 1035 }
1035 1036
1036 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { 1037 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) {
1037 fMipMapSupport = other.fMipMapSupport; 1038 fMipMapSupport = other.fMipMapSupport;
1038 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; 1039 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport;
1039 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; 1040 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport;
1040 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport; 1041 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport;
1041 fHWAALineSupport = other.fHWAALineSupport; 1042 fHWAALineSupport = other.fHWAALineSupport;
1042 fShaderDerivativeSupport = other.fShaderDerivativeSupport; 1043 fShaderDerivativeSupport = other.fShaderDerivativeSupport;
1043 fGeometryShaderSupport = other.fGeometryShaderSupport; 1044 fGeometryShaderSupport = other.fGeometryShaderSupport;
1044 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport; 1045 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport;
1045 fPathRenderingSupport = other.fPathRenderingSupport; 1046 fPathRenderingSupport = other.fPathRenderingSupport;
1046 fDstReadInShaderSupport = other.fDstReadInShaderSupport; 1047 fDstReadInShaderSupport = other.fDstReadInShaderSupport;
1047 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport; 1048 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport;
1048 fReuseScratchTextures = other.fReuseScratchTextures; 1049 fReuseScratchTextures = other.fReuseScratchTextures;
1049 fGpuTracingSupport = other.fGpuTracingSupport; 1050 fGpuTracingSupport = other.fGpuTracingSupport;
1051 fCompressedTexSubImageSupport = other.fCompressedTexSubImageSupport;
1050 1052
1051 fMapBufferFlags = other.fMapBufferFlags; 1053 fMapBufferFlags = other.fMapBufferFlags;
1052 1054
1053 fMaxRenderTargetSize = other.fMaxRenderTargetSize; 1055 fMaxRenderTargetSize = other.fMaxRenderTargetSize;
1054 fMaxTextureSize = other.fMaxTextureSize; 1056 fMaxTextureSize = other.fMaxTextureSize;
1055 fMaxSampleCount = other.fMaxSampleCount; 1057 fMaxSampleCount = other.fMaxSampleCount;
1056 1058
1057 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende rSupport)); 1059 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende rSupport));
1058 memcpy(fConfigTextureSupport, other.fConfigTextureSupport, sizeof(fConfigTex tureSupport)); 1060 memcpy(fConfigTextureSupport, other.fConfigTextureSupport, sizeof(fConfigTex tureSupport));
1059 1061
(...skipping 29 matching lines...) Expand all
1089 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport] ); 1091 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport] );
1090 r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]); 1092 r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]);
1091 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSuppor t]); 1093 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSuppor t]);
1092 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport] ); 1094 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport] );
1093 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBlendingSupp ort]); 1095 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBlendingSupp ort]);
1094 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]) ; 1096 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]) ;
1095 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport ]); 1097 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport ]);
1096 r.appendf("Discard Render Target Support: %s\n", gNY[fDiscardRenderTargetSup port]); 1098 r.appendf("Discard Render Target Support: %s\n", gNY[fDiscardRenderTargetSup port]);
1097 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]) ; 1099 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]) ;
1098 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSupport]); 1100 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSupport]);
1101 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSubImageS upport]);
1099 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); 1102 r.appendf("Max Texture Size : %d\n", fMaxTextureSize);
1100 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize); 1103 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize);
1101 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); 1104 r.appendf("Max Sample Count : %d\n", fMaxSampleCount);
1102 1105
1103 r.appendf("Map Buffer Support : %s\n", map_flags_to_string(fMapBuf ferFlags).c_str()); 1106 r.appendf("Map Buffer Support : %s\n", map_flags_to_string(fMapBuf ferFlags).c_str());
1104 1107
1105 static const char* kConfigNames[] = { 1108 static const char* kConfigNames[] = {
1106 "Unknown", // kUnknown_GrPixelConfig 1109 "Unknown", // kUnknown_GrPixelConfig
1107 "Alpha8", // kAlpha_8_GrPixelConfig, 1110 "Alpha8", // kAlpha_8_GrPixelConfig,
1108 "Index8", // kIndex_8_GrPixelConfig, 1111 "Index8", // kIndex_8_GrPixelConfig,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); 1146 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]);
1144 1147
1145 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { 1148 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) {
1146 r.appendf("%s is uploadable to a texture: %s\n", 1149 r.appendf("%s is uploadable to a texture: %s\n",
1147 kConfigNames[i], 1150 kConfigNames[i],
1148 gNY[fConfigTextureSupport[i]]); 1151 gNY[fConfigTextureSupport[i]]);
1149 } 1152 }
1150 1153
1151 return r; 1154 return r;
1152 } 1155 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrDrawTargetCaps.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698