| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } | 75 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } |
| 76 bool hwAALineSupport() const { return fHWAALineSupport; } | 76 bool hwAALineSupport() const { return fHWAALineSupport; } |
| 77 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } | 77 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } |
| 78 bool geometryShaderSupport() const { return fGeometryShaderSupport; } | 78 bool geometryShaderSupport() const { return fGeometryShaderSupport; } |
| 79 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport;
} | 79 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport;
} |
| 80 bool pathRenderingSupport() const { return fPathRenderingSupport; } | 80 bool pathRenderingSupport() const { return fPathRenderingSupport; } |
| 81 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } | 81 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } |
| 82 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } | 82 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } |
| 83 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 83 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
| 84 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 84 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
| 85 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
| 85 | 86 |
| 86 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } | 87 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
| 87 | 88 |
| 88 /** | 89 /** |
| 89 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte
x buffers and | 90 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte
x buffers and |
| 90 * textures allows partial mappings or full mappings. | 91 * textures allows partial mappings or full mappings. |
| 91 */ | 92 */ |
| 92 enum MapFlags { | 93 enum MapFlags { |
| 93 kNone_MapFlags = 0x0, //<! Cannot map the resource. | 94 kNone_MapFlags = 0x0, //<! Cannot map the resource. |
| 94 | 95 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } | 140 bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } |
| 140 | 141 |
| 141 /** | 142 /** |
| 142 * Gets an id that is unique for this GrDrawTargetCaps object. It is static
in that it does | 143 * Gets an id that is unique for this GrDrawTargetCaps object. It is static
in that it does |
| 143 * not change when the content of the GrDrawTargetCaps object changes. This
will never return | 144 * not change when the content of the GrDrawTargetCaps object changes. This
will never return |
| 144 * 0. | 145 * 0. |
| 145 */ | 146 */ |
| 146 uint32_t getUniqueID() const { return fUniqueID; } | 147 uint32_t getUniqueID() const { return fUniqueID; } |
| 147 | 148 |
| 148 protected: | 149 protected: |
| 149 bool fNPOTTextureTileSupport : 1; | 150 bool fNPOTTextureTileSupport : 1; |
| 150 bool fMipMapSupport : 1; | 151 bool fMipMapSupport : 1; |
| 151 bool fTwoSidedStencilSupport : 1; | 152 bool fTwoSidedStencilSupport : 1; |
| 152 bool fStencilWrapOpsSupport : 1; | 153 bool fStencilWrapOpsSupport : 1; |
| 153 bool fHWAALineSupport : 1; | 154 bool fHWAALineSupport : 1; |
| 154 bool fShaderDerivativeSupport : 1; | 155 bool fShaderDerivativeSupport : 1; |
| 155 bool fGeometryShaderSupport : 1; | 156 bool fGeometryShaderSupport : 1; |
| 156 bool fDualSourceBlendingSupport : 1; | 157 bool fDualSourceBlendingSupport : 1; |
| 157 bool fPathRenderingSupport : 1; | 158 bool fPathRenderingSupport : 1; |
| 158 bool fDstReadInShaderSupport : 1; | 159 bool fDstReadInShaderSupport : 1; |
| 159 bool fDiscardRenderTargetSupport: 1; | 160 bool fDiscardRenderTargetSupport : 1; |
| 160 bool fReuseScratchTextures : 1; | 161 bool fReuseScratchTextures : 1; |
| 161 bool fGpuTracingSupport : 1; | 162 bool fGpuTracingSupport : 1; |
| 162 bool fCompressedTexSubImageSupport : 1; | 163 bool fCompressedTexSubImageSupport : 1; |
| 163 | 164 bool fOversizedStencilSupport : 1; |
| 164 // Driver workaround | 165 // Driver workaround |
| 165 bool fUseDrawInsteadOfClear : 1; | 166 bool fUseDrawInsteadOfClear : 1; |
| 166 | 167 |
| 167 uint32_t fMapBufferFlags; | 168 uint32_t fMapBufferFlags; |
| 168 | 169 |
| 169 int fMaxRenderTargetSize; | 170 int fMaxRenderTargetSize; |
| 170 int fMaxTextureSize; | 171 int fMaxTextureSize; |
| 171 int fMaxSampleCount; | 172 int fMaxSampleCount; |
| 172 | 173 |
| 173 // The first entry for each config is without msaa and the second is with. | 174 // The first entry for each config is without msaa and the second is with. |
| 174 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 175 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
| 175 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 176 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
| 176 | 177 |
| 177 bool fShaderPrecisionVaries; | 178 bool fShaderPrecisionVaries; |
| 178 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 179 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
| 179 | 180 |
| 180 private: | 181 private: |
| 181 static uint32_t CreateUniqueID(); | 182 static uint32_t CreateUniqueID(); |
| 182 | 183 |
| 183 const uint32_t fUniqueID; | 184 const uint32_t fUniqueID; |
| 184 | 185 |
| 185 typedef SkRefCnt INHERITED; | 186 typedef SkRefCnt INHERITED; |
| 186 }; | 187 }; |
| 187 | 188 |
| 188 #endif | 189 #endif |
| OLD | NEW |