| 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 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1011 fHWAALineSupport = false; | 1011 fHWAALineSupport = false; |
| 1012 fShaderDerivativeSupport = false; | 1012 fShaderDerivativeSupport = false; |
| 1013 fGeometryShaderSupport = false; | 1013 fGeometryShaderSupport = false; |
| 1014 fDualSourceBlendingSupport = false; | 1014 fDualSourceBlendingSupport = false; |
| 1015 fPathRenderingSupport = false; | 1015 fPathRenderingSupport = false; |
| 1016 fDstReadInShaderSupport = false; | 1016 fDstReadInShaderSupport = false; |
| 1017 fDiscardRenderTargetSupport = false; | 1017 fDiscardRenderTargetSupport = false; |
| 1018 fReuseScratchTextures = true; | 1018 fReuseScratchTextures = true; |
| 1019 fGpuTracingSupport = false; | 1019 fGpuTracingSupport = false; |
| 1020 fCompressedTexSubImageSupport = false; | 1020 fCompressedTexSubImageSupport = false; |
| 1021 f3DTexImageSupport = false; |
| 1021 | 1022 |
| 1022 fMapBufferFlags = kNone_MapFlags; | 1023 fMapBufferFlags = kNone_MapFlags; |
| 1023 | 1024 |
| 1024 fMaxRenderTargetSize = 0; | 1025 fMaxRenderTargetSize = 0; |
| 1025 fMaxTextureSize = 0; | 1026 fMaxTextureSize = 0; |
| 1026 fMaxSampleCount = 0; | 1027 fMaxSampleCount = 0; |
| 1027 | 1028 |
| 1028 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); | 1029 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); |
| 1029 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); | 1030 memset(fConfigTextureSupport, 0, sizeof(fConfigTextureSupport)); |
| 1030 } | 1031 } |
| 1031 | 1032 |
| 1032 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { | 1033 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { |
| 1033 fMipMapSupport = other.fMipMapSupport; | 1034 fMipMapSupport = other.fMipMapSupport; |
| 1034 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; | 1035 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; |
| 1035 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; | 1036 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; |
| 1036 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport; | 1037 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport; |
| 1037 fHWAALineSupport = other.fHWAALineSupport; | 1038 fHWAALineSupport = other.fHWAALineSupport; |
| 1038 fShaderDerivativeSupport = other.fShaderDerivativeSupport; | 1039 fShaderDerivativeSupport = other.fShaderDerivativeSupport; |
| 1039 fGeometryShaderSupport = other.fGeometryShaderSupport; | 1040 fGeometryShaderSupport = other.fGeometryShaderSupport; |
| 1040 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport; | 1041 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport; |
| 1041 fPathRenderingSupport = other.fPathRenderingSupport; | 1042 fPathRenderingSupport = other.fPathRenderingSupport; |
| 1042 fDstReadInShaderSupport = other.fDstReadInShaderSupport; | 1043 fDstReadInShaderSupport = other.fDstReadInShaderSupport; |
| 1043 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport; | 1044 fDiscardRenderTargetSupport = other.fDiscardRenderTargetSupport; |
| 1044 fReuseScratchTextures = other.fReuseScratchTextures; | 1045 fReuseScratchTextures = other.fReuseScratchTextures; |
| 1045 fGpuTracingSupport = other.fGpuTracingSupport; | 1046 fGpuTracingSupport = other.fGpuTracingSupport; |
| 1046 fCompressedTexSubImageSupport = other.fCompressedTexSubImageSupport; | 1047 fCompressedTexSubImageSupport = other.fCompressedTexSubImageSupport; |
| 1048 f3DTexImageSupport = other.f3DTexImageSupport; |
| 1047 | 1049 |
| 1048 fMapBufferFlags = other.fMapBufferFlags; | 1050 fMapBufferFlags = other.fMapBufferFlags; |
| 1049 | 1051 |
| 1050 fMaxRenderTargetSize = other.fMaxRenderTargetSize; | 1052 fMaxRenderTargetSize = other.fMaxRenderTargetSize; |
| 1051 fMaxTextureSize = other.fMaxTextureSize; | 1053 fMaxTextureSize = other.fMaxTextureSize; |
| 1052 fMaxSampleCount = other.fMaxSampleCount; | 1054 fMaxSampleCount = other.fMaxSampleCount; |
| 1053 | 1055 |
| 1054 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende
rSupport)); | 1056 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende
rSupport)); |
| 1055 memcpy(fConfigTextureSupport, other.fConfigTextureSupport, sizeof(fConfigTex
tureSupport)); | 1057 memcpy(fConfigTextureSupport, other.fConfigTextureSupport, sizeof(fConfigTex
tureSupport)); |
| 1056 | 1058 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1087 r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]); | 1089 r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]); |
| 1088 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSuppor
t]); | 1090 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSuppor
t]); |
| 1089 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]
); | 1091 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport]
); |
| 1090 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBlendingSupp
ort]); | 1092 r.appendf("Dual Source Blending Support : %s\n", gNY[fDualSourceBlendingSupp
ort]); |
| 1091 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport])
; | 1093 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport])
; |
| 1092 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport
]); | 1094 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport
]); |
| 1093 r.appendf("Discard Render Target Support: %s\n", gNY[fDiscardRenderTargetSup
port]); | 1095 r.appendf("Discard Render Target Support: %s\n", gNY[fDiscardRenderTargetSup
port]); |
| 1094 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures])
; | 1096 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures])
; |
| 1095 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSupport]); | 1097 r.appendf("Gpu Tracing Support : %s\n", gNY[fGpuTracingSupport]); |
| 1096 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSubImageS
upport]); | 1098 r.appendf("Compressed Update Support : %s\n", gNY[fCompressedTexSubImageS
upport]); |
| 1099 r.appendf("3D Texture Support : %s\n", gNY[f3DTexImageSupport]); |
| 1097 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); | 1100 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); |
| 1098 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize); | 1101 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize); |
| 1099 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); | 1102 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); |
| 1100 | 1103 |
| 1101 r.appendf("Map Buffer Support : %s\n", map_flags_to_string(fMapBuf
ferFlags).c_str()); | 1104 r.appendf("Map Buffer Support : %s\n", map_flags_to_string(fMapBuf
ferFlags).c_str()); |
| 1102 | 1105 |
| 1103 static const char* kConfigNames[] = { | 1106 static const char* kConfigNames[] = { |
| 1104 "Unknown", // kUnknown_GrPixelConfig | 1107 "Unknown", // kUnknown_GrPixelConfig |
| 1105 "Alpha8", // kAlpha_8_GrPixelConfig, | 1108 "Alpha8", // kAlpha_8_GrPixelConfig, |
| 1106 "Index8", // kIndex_8_GrPixelConfig, | 1109 "Index8", // kIndex_8_GrPixelConfig, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1141 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); | 1144 SkASSERT(!fConfigTextureSupport[kUnknown_GrPixelConfig]); |
| 1142 | 1145 |
| 1143 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 1146 for (size_t i = 1; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
| 1144 r.appendf("%s is uploadable to a texture: %s\n", | 1147 r.appendf("%s is uploadable to a texture: %s\n", |
| 1145 kConfigNames[i], | 1148 kConfigNames[i], |
| 1146 gNY[fConfigTextureSupport[i]]); | 1149 gNY[fConfigTextureSupport[i]]); |
| 1147 } | 1150 } |
| 1148 | 1151 |
| 1149 return r; | 1152 return r; |
| 1150 } | 1153 } |
| OLD | NEW |