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 GrCaps_DEFINED | 8 #ifndef GrCaps_DEFINED |
9 #define GrCaps_DEFINED | 9 #define GrCaps_DEFINED |
10 | 10 |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } | 138 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } |
139 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor
t of MIP Maps (e.g. | 139 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor
t of MIP Maps (e.g. |
140 only for POT textures) */ | 140 only for POT textures) */ |
141 bool mipMapSupport() const { return fMipMapSupport; } | 141 bool mipMapSupport() const { return fMipMapSupport; } |
142 | 142 |
143 /** | 143 /** |
144 * Skia convention is that a device only has sRGB support if it supports sRG
B formats for both | 144 * Skia convention is that a device only has sRGB support if it supports sRG
B formats for both |
145 * textures and framebuffers. In addition: | 145 * textures and framebuffers. In addition: |
146 * Decoding to linear of an sRGB texture can be disabled. | 146 * Decoding to linear of an sRGB texture can be disabled. |
147 * Encoding and gamma-correct blending to an sRGB framebuffer can be disab
led. | |
148 */ | 147 */ |
149 bool srgbSupport() const { return fSRGBSupport; } | 148 bool srgbSupport() const { return fSRGBSupport; } |
| 149 /** |
| 150 * Is there support for enabling/disabling sRGB writes for sRGB-capable colo
r buffers? |
| 151 */ |
| 152 bool srgbWriteControl() const { return fSRGBWriteControl; } |
150 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } | 153 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } |
151 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } | 154 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } |
152 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } | 155 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } |
153 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 156 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
154 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 157 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
155 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } | 158 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
156 bool textureBarrierSupport() const { return fTextureBarrierSupport; } | 159 bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
157 bool sampleLocationsSupport() const { return fSampleLocationsSupport; } | 160 bool sampleLocationsSupport() const { return fSampleLocationsSupport; } |
158 bool usesMixedSamples() const { return fUsesMixedSamples; } | 161 bool usesMixedSamples() const { return fUsesMixedSamples; } |
159 | 162 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 /** Subclasses must call this at the end of their constructors in order to a
pply caps | 280 /** Subclasses must call this at the end of their constructors in order to a
pply caps |
278 overrides requested by the client. Note that overrides will only reduce
the caps never | 281 overrides requested by the client. Note that overrides will only reduce
the caps never |
279 expand them. */ | 282 expand them. */ |
280 void applyOptionsOverrides(const GrContextOptions& options); | 283 void applyOptionsOverrides(const GrContextOptions& options); |
281 | 284 |
282 SkAutoTUnref<GrShaderCaps> fShaderCaps; | 285 SkAutoTUnref<GrShaderCaps> fShaderCaps; |
283 | 286 |
284 bool fNPOTTextureTileSupport : 1; | 287 bool fNPOTTextureTileSupport : 1; |
285 bool fMipMapSupport : 1; | 288 bool fMipMapSupport : 1; |
286 bool fSRGBSupport : 1; | 289 bool fSRGBSupport : 1; |
| 290 bool fSRGBWriteControl : 1; |
287 bool fTwoSidedStencilSupport : 1; | 291 bool fTwoSidedStencilSupport : 1; |
288 bool fStencilWrapOpsSupport : 1; | 292 bool fStencilWrapOpsSupport : 1; |
289 bool fDiscardRenderTargetSupport : 1; | 293 bool fDiscardRenderTargetSupport : 1; |
290 bool fReuseScratchTextures : 1; | 294 bool fReuseScratchTextures : 1; |
291 bool fReuseScratchBuffers : 1; | 295 bool fReuseScratchBuffers : 1; |
292 bool fGpuTracingSupport : 1; | 296 bool fGpuTracingSupport : 1; |
293 bool fCompressedTexSubImageSupport : 1; | 297 bool fCompressedTexSubImageSupport : 1; |
294 bool fOversizedStencilSupport : 1; | 298 bool fOversizedStencilSupport : 1; |
295 bool fTextureBarrierSupport : 1; | 299 bool fTextureBarrierSupport : 1; |
296 bool fSampleLocationsSupport : 1; | 300 bool fSampleLocationsSupport : 1; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 332 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
329 | 333 |
330 bool fSuppressPrints : 1; | 334 bool fSuppressPrints : 1; |
331 bool fImmediateFlush: 1; | 335 bool fImmediateFlush: 1; |
332 bool fDrawPathMasksToCompressedTextureSupport : 1; | 336 bool fDrawPathMasksToCompressedTextureSupport : 1; |
333 | 337 |
334 typedef SkRefCnt INHERITED; | 338 typedef SkRefCnt INHERITED; |
335 }; | 339 }; |
336 | 340 |
337 #endif | 341 #endif |
OLD | NEW |