| 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 953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 964 fTwoSidedStencilSupport = false; | 964 fTwoSidedStencilSupport = false; |
| 965 fStencilWrapOpsSupport = false; | 965 fStencilWrapOpsSupport = false; |
| 966 fHWAALineSupport = false; | 966 fHWAALineSupport = false; |
| 967 fShaderDerivativeSupport = false; | 967 fShaderDerivativeSupport = false; |
| 968 fGeometryShaderSupport = false; | 968 fGeometryShaderSupport = false; |
| 969 fDualSourceBlendingSupport = false; | 969 fDualSourceBlendingSupport = false; |
| 970 fBufferLockSupport = false; | 970 fBufferLockSupport = false; |
| 971 fPathRenderingSupport = false; | 971 fPathRenderingSupport = false; |
| 972 fDstReadInShaderSupport = false; | 972 fDstReadInShaderSupport = false; |
| 973 fReuseScratchTextures = true; | 973 fReuseScratchTextures = true; |
| 974 fDebugMarkerSupport = false; |
| 974 | 975 |
| 975 fMaxRenderTargetSize = 0; | 976 fMaxRenderTargetSize = 0; |
| 976 fMaxTextureSize = 0; | 977 fMaxTextureSize = 0; |
| 977 fMaxSampleCount = 0; | 978 fMaxSampleCount = 0; |
| 978 | 979 |
| 979 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); | 980 memset(fConfigRenderSupport, 0, sizeof(fConfigRenderSupport)); |
| 980 } | 981 } |
| 981 | 982 |
| 982 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { | 983 GrDrawTargetCaps& GrDrawTargetCaps::operator=(const GrDrawTargetCaps& other) { |
| 983 f8BitPaletteSupport = other.f8BitPaletteSupport; | 984 f8BitPaletteSupport = other.f8BitPaletteSupport; |
| 984 fMipMapSupport = other.fMipMapSupport; | 985 fMipMapSupport = other.fMipMapSupport; |
| 985 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; | 986 fNPOTTextureTileSupport = other.fNPOTTextureTileSupport; |
| 986 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; | 987 fTwoSidedStencilSupport = other.fTwoSidedStencilSupport; |
| 987 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport; | 988 fStencilWrapOpsSupport = other.fStencilWrapOpsSupport; |
| 988 fHWAALineSupport = other.fHWAALineSupport; | 989 fHWAALineSupport = other.fHWAALineSupport; |
| 989 fShaderDerivativeSupport = other.fShaderDerivativeSupport; | 990 fShaderDerivativeSupport = other.fShaderDerivativeSupport; |
| 990 fGeometryShaderSupport = other.fGeometryShaderSupport; | 991 fGeometryShaderSupport = other.fGeometryShaderSupport; |
| 991 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport; | 992 fDualSourceBlendingSupport = other.fDualSourceBlendingSupport; |
| 992 fBufferLockSupport = other.fBufferLockSupport; | 993 fBufferLockSupport = other.fBufferLockSupport; |
| 993 fPathRenderingSupport = other.fPathRenderingSupport; | 994 fPathRenderingSupport = other.fPathRenderingSupport; |
| 994 fDstReadInShaderSupport = other.fDstReadInShaderSupport; | 995 fDstReadInShaderSupport = other.fDstReadInShaderSupport; |
| 995 fReuseScratchTextures = other.fReuseScratchTextures; | 996 fReuseScratchTextures = other.fReuseScratchTextures; |
| 997 fDebugMarkerSupport = other.fDebugMarkerSupport; |
| 996 | 998 |
| 997 fMaxRenderTargetSize = other.fMaxRenderTargetSize; | 999 fMaxRenderTargetSize = other.fMaxRenderTargetSize; |
| 998 fMaxTextureSize = other.fMaxTextureSize; | 1000 fMaxTextureSize = other.fMaxTextureSize; |
| 999 fMaxSampleCount = other.fMaxSampleCount; | 1001 fMaxSampleCount = other.fMaxSampleCount; |
| 1000 | 1002 |
| 1001 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende
rSupport)); | 1003 memcpy(fConfigRenderSupport, other.fConfigRenderSupport, sizeof(fConfigRende
rSupport)); |
| 1002 | 1004 |
| 1003 return *this; | 1005 return *this; |
| 1004 } | 1006 } |
| 1005 | 1007 |
| 1006 SkString GrDrawTargetCaps::dump() const { | 1008 SkString GrDrawTargetCaps::dump() const { |
| 1007 SkString r; | 1009 SkString r; |
| 1008 static const char* gNY[] = {"NO", "YES"}; | 1010 static const char* gNY[] = {"NO", "YES"}; |
| 1009 r.appendf("8 Bit Palette Support : %s\n", gNY[f8BitPaletteSupport]); | 1011 r.appendf("8 Bit Palette Support : %s\n", gNY[f8BitPaletteSupport]); |
| 1010 r.appendf("MIP Map Support : %s\n", gNY[fMipMapSupport]); | 1012 r.appendf("MIP Map Support : %s\n", gNY[fMipMapSupport]); |
| 1011 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileSupport]
); | 1013 r.appendf("NPOT Texture Tile Support : %s\n", gNY[fNPOTTextureTileSupport]
); |
| 1012 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilSupport]
); | 1014 r.appendf("Two Sided Stencil Support : %s\n", gNY[fTwoSidedStencilSupport]
); |
| 1013 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport])
; | 1015 r.appendf("Stencil Wrap Ops Support : %s\n", gNY[fStencilWrapOpsSupport])
; |
| 1014 r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]); | 1016 r.appendf("HW AA Lines Support : %s\n", gNY[fHWAALineSupport]); |
| 1015 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport
]); | 1017 r.appendf("Shader Derivative Support : %s\n", gNY[fShaderDerivativeSupport
]); |
| 1016 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport])
; | 1018 r.appendf("Geometry Shader Support : %s\n", gNY[fGeometryShaderSupport])
; |
| 1017 r.appendf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppo
rt]); | 1019 r.appendf("Dual Source Blending Support: %s\n", gNY[fDualSourceBlendingSuppo
rt]); |
| 1018 r.appendf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); | 1020 r.appendf("Buffer Lock Support : %s\n", gNY[fBufferLockSupport]); |
| 1019 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]); | 1021 r.appendf("Path Rendering Support : %s\n", gNY[fPathRenderingSupport]); |
| 1020 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]
); | 1022 r.appendf("Dst Read In Shader Support : %s\n", gNY[fDstReadInShaderSupport]
); |
| 1021 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]); | 1023 r.appendf("Reuse Scratch Textures : %s\n", gNY[fReuseScratchTextures]); |
| 1024 r.appendf("Debug Marker Support : %s\n", gNY[fDebugMarkerSupport]); |
| 1022 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); | 1025 r.appendf("Max Texture Size : %d\n", fMaxTextureSize); |
| 1023 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize); | 1026 r.appendf("Max Render Target Size : %d\n", fMaxRenderTargetSize); |
| 1024 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); | 1027 r.appendf("Max Sample Count : %d\n", fMaxSampleCount); |
| 1025 | 1028 |
| 1026 static const char* kConfigNames[] = { | 1029 static const char* kConfigNames[] = { |
| 1027 "Unknown", // kUnknown_GrPixelConfig | 1030 "Unknown", // kUnknown_GrPixelConfig |
| 1028 "Alpha8", // kAlpha_8_GrPixelConfig, | 1031 "Alpha8", // kAlpha_8_GrPixelConfig, |
| 1029 "Index8", // kIndex_8_GrPixelConfig, | 1032 "Index8", // kIndex_8_GrPixelConfig, |
| 1030 "RGB565", // kRGB_565_GrPixelConfig, | 1033 "RGB565", // kRGB_565_GrPixelConfig, |
| 1031 "RGBA444", // kRGBA_4444_GrPixelConfig, | 1034 "RGBA444", // kRGBA_4444_GrPixelConfig, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1046 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) { | 1049 for (size_t i = 0; i < SK_ARRAY_COUNT(kConfigNames); ++i) { |
| 1047 if (i != kUnknown_GrPixelConfig) { | 1050 if (i != kUnknown_GrPixelConfig) { |
| 1048 r.appendf("%s is renderable: %s, with MSAA: %s\n", | 1051 r.appendf("%s is renderable: %s, with MSAA: %s\n", |
| 1049 kConfigNames[i], | 1052 kConfigNames[i], |
| 1050 gNY[fConfigRenderSupport[i][0]], | 1053 gNY[fConfigRenderSupport[i][0]], |
| 1051 gNY[fConfigRenderSupport[i][1]]); | 1054 gNY[fConfigRenderSupport[i][1]]); |
| 1052 } | 1055 } |
| 1053 } | 1056 } |
| 1054 return r; | 1057 return r; |
| 1055 } | 1058 } |
| OLD | NEW |