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