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 28 matching lines...) Expand all Loading... |
39 bool hwAALineSupport() const { return fHWAALineSupport; } | 39 bool hwAALineSupport() const { return fHWAALineSupport; } |
40 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } | 40 bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } |
41 bool geometryShaderSupport() const { return fGeometryShaderSupport; } | 41 bool geometryShaderSupport() const { return fGeometryShaderSupport; } |
42 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport;
} | 42 bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport;
} |
43 bool pathRenderingSupport() const { return fPathRenderingSupport; } | 43 bool pathRenderingSupport() const { return fPathRenderingSupport; } |
44 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } | 44 bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } |
45 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } | 45 bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport
; } |
46 bool gpuTracingSupport() const { return fGpuTracingSupport; } | 46 bool gpuTracingSupport() const { return fGpuTracingSupport; } |
47 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } | 47 bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSup
port; } |
48 | 48 |
| 49 bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
| 50 |
49 /** | 51 /** |
50 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte
x buffers and | 52 * Indicates whether GPU->CPU memory mapping for GPU resources such as verte
x buffers and |
51 * textures allows partial mappings or full mappings. | 53 * textures allows partial mappings or full mappings. |
52 */ | 54 */ |
53 enum MapFlags { | 55 enum MapFlags { |
54 kNone_MapFlags = 0x0, //<! Cannot map the resource. | 56 kNone_MapFlags = 0x0, //<! Cannot map the resource. |
55 | 57 |
56 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s
et for any of | 58 kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be s
et for any of |
57 // the other flags to have meaning.k | 59 // the other flags to have meaning.k |
58 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. | 60 kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 bool fShaderDerivativeSupport : 1; | 99 bool fShaderDerivativeSupport : 1; |
98 bool fGeometryShaderSupport : 1; | 100 bool fGeometryShaderSupport : 1; |
99 bool fDualSourceBlendingSupport : 1; | 101 bool fDualSourceBlendingSupport : 1; |
100 bool fPathRenderingSupport : 1; | 102 bool fPathRenderingSupport : 1; |
101 bool fDstReadInShaderSupport : 1; | 103 bool fDstReadInShaderSupport : 1; |
102 bool fDiscardRenderTargetSupport: 1; | 104 bool fDiscardRenderTargetSupport: 1; |
103 bool fReuseScratchTextures : 1; | 105 bool fReuseScratchTextures : 1; |
104 bool fGpuTracingSupport : 1; | 106 bool fGpuTracingSupport : 1; |
105 bool fCompressedTexSubImageSupport : 1; | 107 bool fCompressedTexSubImageSupport : 1; |
106 | 108 |
| 109 // Driver workaround |
| 110 bool fUseDrawInsteadOfClear : 1; |
| 111 |
107 uint32_t fMapBufferFlags; | 112 uint32_t fMapBufferFlags; |
108 | 113 |
109 int fMaxRenderTargetSize; | 114 int fMaxRenderTargetSize; |
110 int fMaxTextureSize; | 115 int fMaxTextureSize; |
111 int fMaxSampleCount; | 116 int fMaxSampleCount; |
112 | 117 |
113 // The first entry for each config is without msaa and the second is with. | 118 // The first entry for each config is without msaa and the second is with. |
114 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; | 119 bool fConfigRenderSupport[kGrPixelConfigCnt][2]; |
115 bool fConfigTextureSupport[kGrPixelConfigCnt]; | 120 bool fConfigTextureSupport[kGrPixelConfigCnt]; |
116 | 121 |
117 private: | 122 private: |
118 static uint32_t CreateUniqueID(); | 123 static uint32_t CreateUniqueID(); |
119 | 124 |
120 const uint32_t fUniqueID; | 125 const uint32_t fUniqueID; |
121 | 126 |
122 typedef SkRefCnt INHERITED; | 127 typedef SkRefCnt INHERITED; |
123 }; | 128 }; |
124 | 129 |
125 #endif | 130 #endif |
OLD | NEW |