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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 GrCaps(const GrContextOptions&); | 130 GrCaps(const GrContextOptions&); |
131 | 131 |
132 virtual SkString dump() const; | 132 virtual SkString dump() const; |
133 | 133 |
134 GrShaderCaps* shaderCaps() const { return fShaderCaps; } | 134 GrShaderCaps* shaderCaps() const { return fShaderCaps; } |
135 | 135 |
136 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } | 136 bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } |
137 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor
t of MIP Maps (e.g. | 137 /** To avoid as-yet-unnecessary complexity we don't allow any partial suppor
t of MIP Maps (e.g. |
138 only for POT textures) */ | 138 only for POT textures) */ |
139 bool mipMapSupport() const { return fMipMapSupport; } | 139 bool mipMapSupport() const { return fMipMapSupport; } |
| 140 bool srgbSupport() const { return fSRGBSupport; } |
140 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } | 141 bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } |
141 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } | 142 bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } |
142 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } | 143 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } |
143 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 144 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
144 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 145 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
145 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } | 146 bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
146 bool textureBarrierSupport() const { return fTextureBarrierSupport; } | 147 bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
147 bool sampleLocationsSupport() const { return fSampleLocationsSupport; } | 148 bool sampleLocationsSupport() const { return fSampleLocationsSupport; } |
148 bool usesMixedSamples() const { return fUsesMixedSamples; } | 149 bool usesMixedSamples() const { return fUsesMixedSamples; } |
149 | 150 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 protected: | 262 protected: |
262 /** Subclasses must call this at the end of their constructors in order to a
pply caps | 263 /** Subclasses must call this at the end of their constructors in order to a
pply caps |
263 overrides requested by the client. Note that overrides will only reduce
the caps never | 264 overrides requested by the client. Note that overrides will only reduce
the caps never |
264 expand them. */ | 265 expand them. */ |
265 void applyOptionsOverrides(const GrContextOptions& options); | 266 void applyOptionsOverrides(const GrContextOptions& options); |
266 | 267 |
267 SkAutoTUnref<GrShaderCaps> fShaderCaps; | 268 SkAutoTUnref<GrShaderCaps> fShaderCaps; |
268 | 269 |
269 bool fNPOTTextureTileSupport : 1; | 270 bool fNPOTTextureTileSupport : 1; |
270 bool fMipMapSupport : 1; | 271 bool fMipMapSupport : 1; |
| 272 bool fSRGBSupport : 1; |
271 bool fTwoSidedStencilSupport : 1; | 273 bool fTwoSidedStencilSupport : 1; |
272 bool fStencilWrapOpsSupport : 1; | 274 bool fStencilWrapOpsSupport : 1; |
273 bool fDiscardRenderTargetSupport : 1; | 275 bool fDiscardRenderTargetSupport : 1; |
274 bool fReuseScratchTextures : 1; | 276 bool fReuseScratchTextures : 1; |
275 bool fReuseScratchBuffers : 1; | 277 bool fReuseScratchBuffers : 1; |
276 bool fGpuTracingSupport : 1; | 278 bool fGpuTracingSupport : 1; |
277 bool fCompressedTexSubImageSupport : 1; | 279 bool fCompressedTexSubImageSupport : 1; |
278 bool fOversizedStencilSupport : 1; | 280 bool fOversizedStencilSupport : 1; |
279 bool fTextureBarrierSupport : 1; | 281 bool fTextureBarrierSupport : 1; |
280 bool fSampleLocationsSupport : 1; | 282 bool fSampleLocationsSupport : 1; |
(...skipping 28 matching lines...) Expand all Loading... |
309 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; | 311 virtual void onApplyOptionsOverrides(const GrContextOptions&) {}; |
310 | 312 |
311 bool fSuppressPrints : 1; | 313 bool fSuppressPrints : 1; |
312 bool fImmediateFlush: 1; | 314 bool fImmediateFlush: 1; |
313 bool fDrawPathMasksToCompressedTextureSupport : 1; | 315 bool fDrawPathMasksToCompressedTextureSupport : 1; |
314 | 316 |
315 typedef SkRefCnt INHERITED; | 317 typedef SkRefCnt INHERITED; |
316 }; | 318 }; |
317 | 319 |
318 #endif | 320 #endif |
OLD | NEW |