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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 bool gpuTracingSupport() const { return true; } | 83 bool gpuTracingSupport() const { return true; } |
84 #else | 84 #else |
85 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 85 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
86 #endif | 86 #endif |
87 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 87 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
88 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } | 88 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
89 | 89 |
90 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } | 90 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
91 | 91 |
92 /** | 92 /** |
| 93 * Indicates the capabilities of the fixed function blend unit. |
| 94 */ |
| 95 enum BlendEquationSupport { |
| 96 kBasic_BlendEquationSupport, //<! Support to select the oper
ator that |
| 97 // combines src and dst terms
. |
| 98 kAdvanced_BlendEquationSupport, //<! Additional fixed function
support for specific |
| 99 // SVG/PDF blend modes. Requi
res blend barriers. |
| 100 kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation su
pport that does not |
| 101 // require blend barriers, an
d permits overlap. |
| 102 |
| 103 kLast_BlendEquationSupport = kAdvancedCoherent_BlendEquationSupport |
| 104 }; |
| 105 |
| 106 BlendEquationSupport blendEquationSupport() const { return fBlendEquationSup
port; } |
| 107 |
| 108 bool advancedBlendEquationSupport() const { |
| 109 return kBasic_BlendEquationSupport != fBlendEquationSupport; |
| 110 } |
| 111 |
| 112 /** |
93 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte
x buffers and | 113 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte
x buffers and |
94 * textures allows partial mappings or full mappings. | 114 * textures allows partial mappings or full mappings. |
95 */ | 115 */ |
96 enum MapFlags { | 116 enum MapFlags { |
97 kNone_MapFlags = 0x0, //<! Cannot map the resource. | 117 kNone_MapFlags = 0x0, //<! Cannot map the resource. |
98 | 118 |
99 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s
et for any of | 119 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s
et for any of |
100 // the other flags to have meaning.k | 120 // the other flags to have meaning.k |
101 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. | 121 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. |
102 }; | 122 }; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 bool fPathRenderingSupport : 1; | 173 bool fPathRenderingSupport : 1; |
154 bool fDstReadInShaderSupport : 1; | 174 bool fDstReadInShaderSupport : 1; |
155 bool fDiscardRenderTargetSupport : 1; | 175 bool fDiscardRenderTargetSupport : 1; |
156 bool fReuseScratchTextures : 1; | 176 bool fReuseScratchTextures : 1; |
157 bool fGpuTracingSupport : 1; | 177 bool fGpuTracingSupport : 1; |
158 bool fCompressedTexSubImageSupport : 1; | 178 bool fCompressedTexSubImageSupport : 1; |
159 bool fOversizedStencilSupport : 1; | 179 bool fOversizedStencilSupport : 1; |
160 // Driver workaround | 180 // Driver workaround |
161 bool fUseDrawInsteadOfClear : 1; | 181 bool fUseDrawInsteadOfClear : 1; |
162 | 182 |
| 183 BlendEquationSupport fBlendEquationSupport; |
163 uint32_t fMapBufferFlags; | 184 uint32_t fMapBufferFlags; |
164 | 185 |
165 int fMaxRenderTargetSize; | 186 int fMaxRenderTargetSize; |
166 int fMaxTextureSize; | 187 int fMaxTextureSize; |
167 int fMaxSampleCount; | 188 int fMaxSampleCount; |
168 | 189 |
169 // The first entry for each config is without msaa and the second is with. | 190 // The first entry for each config is without msaa and the second is with. |
170 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 191 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
171 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 192 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
172 | 193 |
173 bool fShaderPrecisionVaries; | 194 bool fShaderPrecisionVaries; |
174 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; | 195 PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; |
175 | 196 |
176 private: | 197 private: |
177 typedef SkRefCnt INHERITED; | 198 typedef SkRefCnt INHERITED; |
178 }; | 199 }; |
179 | 200 |
180 #endif | 201 #endif |
OLD | NEW |