| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #ifndef GrDrawTargetCaps_DEFINED | 8 #ifndef GrDrawTargetCaps_DEFINED |
| 9 #define GrDrawTargetCaps_DEFINED | 9 #define GrDrawTargetCaps_DEFINED |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } | 65 int maxRenderTargetSize() const { return fMaxRenderTargetSize; } |
| 66 int maxTextureSize() const { return fMaxTextureSize; } | 66 int maxTextureSize() const { return fMaxTextureSize; } |
| 67 // Will be 0 if MSAA is not supported | 67 // Will be 0 if MSAA is not supported |
| 68 int maxSampleCount() const { return fMaxSampleCount; } | 68 int maxSampleCount() const { return fMaxSampleCount; } |
| 69 | 69 |
| 70 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { | 70 bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { |
| 71 SkASSERT(kGrPixelConfigCnt > config); | 71 SkASSERT(kGrPixelConfigCnt > config); |
| 72 return fConfigRenderSupport[config][withMSAA]; | 72 return fConfigRenderSupport[config][withMSAA]; |
| 73 } | 73 } |
| 74 | 74 |
| 75 bool compressedTextureSupport(GrCompressedFormat format) const { |
| 76 SkASSERT(kGrCompressedFormatCount > format); |
| 77 return fCompressedFormatSupport[format]; |
| 78 } |
| 79 |
| 75 protected: | 80 protected: |
| 76 bool f8BitPaletteSupport : 1; | 81 bool f8BitPaletteSupport : 1; |
| 77 bool fNPOTTextureTileSupport : 1; | 82 bool fNPOTTextureTileSupport : 1; |
| 78 bool fMipMapSupport : 1; | 83 bool fMipMapSupport : 1; |
| 79 bool fTwoSidedStencilSupport : 1; | 84 bool fTwoSidedStencilSupport : 1; |
| 80 bool fStencilWrapOpsSupport : 1; | 85 bool fStencilWrapOpsSupport : 1; |
| 81 bool fHWAALineSupport : 1; | 86 bool fHWAALineSupport : 1; |
| 82 bool fShaderDerivativeSupport : 1; | 87 bool fShaderDerivativeSupport : 1; |
| 83 bool fGeometryShaderSupport : 1; | 88 bool fGeometryShaderSupport : 1; |
| 84 bool fDualSourceBlendingSupport : 1; | 89 bool fDualSourceBlendingSupport : 1; |
| 85 bool fPathRenderingSupport : 1; | 90 bool fPathRenderingSupport : 1; |
| 86 bool fDstReadInShaderSupport : 1; | 91 bool fDstReadInShaderSupport : 1; |
| 87 bool fDiscardRenderTargetSupport: 1; | 92 bool fDiscardRenderTargetSupport: 1; |
| 88 bool fReuseScratchTextures : 1; | 93 bool fReuseScratchTextures : 1; |
| 89 bool fGpuTracingSupport : 1; | 94 bool fGpuTracingSupport : 1; |
| 90 | 95 |
| 91 uint32_t fMapBufferFlags; | 96 uint32_t fMapBufferFlags; |
| 92 | 97 |
| 93 int fMaxRenderTargetSize; | 98 int fMaxRenderTargetSize; |
| 94 int fMaxTextureSize; | 99 int fMaxTextureSize; |
| 95 int fMaxSampleCount; | 100 int fMaxSampleCount; |
| 96 | 101 |
| 97 // The first entry for each config is without msaa and the second is with. | 102 // The first entry for each config is without msaa and the second is with. |
| 98 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 103 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
| 99 | 104 |
| 105 bool fCompressedFormatSupport[kGrCompressedFormatCount]; |
| 106 |
| 100 typedef SkRefCnt INHERITED; | 107 typedef SkRefCnt INHERITED; |
| 101 }; | 108 }; |
| 102 | 109 |
| 103 #endif | 110 #endif |
| OLD | NEW |