bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2013 Google Inc. |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
bsalomon | 4b91f76 | 2015-05-19 09:29:46 -0700 | [diff] [blame] | 8 | #ifndef GrCaps_DEFINED |
| 9 | #define GrCaps_DEFINED |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 10 | |
Brian Salomon | c588603 | 2017-07-19 11:48:05 -0400 | [diff] [blame] | 11 | #include "../private/GrTypesPriv.h" |
cdalton | 1dd0542 | 2015-06-12 09:01:18 -0700 | [diff] [blame] | 12 | #include "GrBlend.h" |
Brian Salomon | 94efbf5 | 2016-11-29 13:43:05 -0500 | [diff] [blame] | 13 | #include "GrShaderCaps.h" |
commit-bot@chromium.org | 8b656c6 | 2013-11-21 15:23:15 +0000 | [diff] [blame] | 14 | #include "SkRefCnt.h" |
| 15 | #include "SkString.h" |
| 16 | |
bsalomon | 682c269 | 2015-05-22 14:01:46 -0700 | [diff] [blame] | 17 | struct GrContextOptions; |
Robert Phillips | bf25d43 | 2017-04-07 10:08:53 -0400 | [diff] [blame] | 18 | class GrRenderTargetProxy; |
Brian Osman | 71a1889 | 2017-08-10 10:23:25 -0400 | [diff] [blame] | 19 | class SkJSONWriter; |
jvanverth | e9c0fc6 | 2015-04-29 11:18:05 -0700 | [diff] [blame] | 20 | |
| 21 | /** |
bsalomon | 4b91f76 | 2015-05-19 09:29:46 -0700 | [diff] [blame] | 22 | * Represents the capabilities of a GrContext. |
jvanverth | e9c0fc6 | 2015-04-29 11:18:05 -0700 | [diff] [blame] | 23 | */ |
bsalomon | 4b91f76 | 2015-05-19 09:29:46 -0700 | [diff] [blame] | 24 | class GrCaps : public SkRefCnt { |
jvanverth | e9c0fc6 | 2015-04-29 11:18:05 -0700 | [diff] [blame] | 25 | public: |
bsalomon | 682c269 | 2015-05-22 14:01:46 -0700 | [diff] [blame] | 26 | GrCaps(const GrContextOptions&); |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 27 | |
Brian Osman | 71a1889 | 2017-08-10 10:23:25 -0400 | [diff] [blame] | 28 | void dumpJSON(SkJSONWriter*) const; |
| 29 | |
Brian Salomon | 94efbf5 | 2016-11-29 13:43:05 -0500 | [diff] [blame] | 30 | const GrShaderCaps* shaderCaps() const { return fShaderCaps.get(); } |
jvanverth | e9c0fc6 | 2015-04-29 11:18:05 -0700 | [diff] [blame] | 31 | |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 32 | bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } |
commit-bot@chromium.org | 4744231 | 2013-12-19 16:18:01 +0000 | [diff] [blame] | 33 | /** To avoid as-yet-unnecessary complexity we don't allow any partial support of MIP Maps (e.g. |
| 34 | only for POT textures) */ |
| 35 | bool mipMapSupport() const { return fMipMapSupport; } |
brianosman | 64d094d | 2016-03-25 06:01:59 -0700 | [diff] [blame] | 36 | |
| 37 | /** |
| 38 | * Skia convention is that a device only has sRGB support if it supports sRGB formats for both |
| 39 | * textures and framebuffers. In addition: |
| 40 | * Decoding to linear of an sRGB texture can be disabled. |
brianosman | 64d094d | 2016-03-25 06:01:59 -0700 | [diff] [blame] | 41 | */ |
brianosman | a635936 | 2016-03-21 06:55:37 -0700 | [diff] [blame] | 42 | bool srgbSupport() const { return fSRGBSupport; } |
brianosman | 35b784d | 2016-05-05 11:52:53 -0700 | [diff] [blame] | 43 | /** |
| 44 | * Is there support for enabling/disabling sRGB writes for sRGB-capable color buffers? |
| 45 | */ |
| 46 | bool srgbWriteControl() const { return fSRGBWriteControl; } |
Brian Osman | 57bc3ea | 2017-07-27 09:58:11 -0400 | [diff] [blame] | 47 | bool srgbDecodeDisableSupport() const { return fSRGBDecodeDisableSupport; } |
commit-bot@chromium.org | 28361fa | 2014-03-28 16:08:05 +0000 | [diff] [blame] | 48 | bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport; } |
commit-bot@chromium.org | a3baf3b | 2014-02-21 18:45:30 +0000 | [diff] [blame] | 49 | bool gpuTracingSupport() const { return fGpuTracingSupport; } |
bsalomon | d08ea5f | 2015-02-20 06:58:13 -0800 | [diff] [blame] | 50 | bool oversizedStencilSupport() const { return fOversizedStencilSupport; } |
cdalton | fd4167d | 2015-04-21 11:45:56 -0700 | [diff] [blame] | 51 | bool textureBarrierSupport() const { return fTextureBarrierSupport; } |
cdalton | eb79eea | 2016-02-26 10:39:34 -0800 | [diff] [blame] | 52 | bool sampleLocationsSupport() const { return fSampleLocationsSupport; } |
csmartdalton | 2b5f2cb | 2016-06-10 14:06:32 -0700 | [diff] [blame] | 53 | bool multisampleDisableSupport() const { return fMultisampleDisableSupport; } |
Chris Dalton | 1d61635 | 2017-05-31 12:51:23 -0600 | [diff] [blame] | 54 | bool instanceAttribSupport() const { return fInstanceAttribSupport; } |
egdaniel | eed519e | 2016-01-15 11:36:18 -0800 | [diff] [blame] | 55 | bool usesMixedSamples() const { return fUsesMixedSamples; } |
csmartdalton | 485a120 | 2016-07-13 10:16:32 -0700 | [diff] [blame] | 56 | bool preferClientSideDynamicBuffers() const { return fPreferClientSideDynamicBuffers; } |
robertphillips@google.com | 2d2e5c4 | 2013-10-30 21:30:43 +0000 | [diff] [blame] | 57 | |
bsalomon | 63b2196 | 2014-11-05 07:05:34 -0800 | [diff] [blame] | 58 | bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } |
bsalomon | babafcc | 2016-02-16 11:36:47 -0800 | [diff] [blame] | 59 | |
robertphillips | 6392668 | 2015-08-20 09:39:02 -0700 | [diff] [blame] | 60 | bool preferVRAMUseOverFlushes() const { return fPreferVRAMUseOverFlushes; } |
| 61 | |
commit-bot@chromium.org | 160b478 | 2014-05-05 12:32:37 +0000 | [diff] [blame] | 62 | /** |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 63 | * Indicates the level of support for gr_instanced::* functionality. A higher level includes |
| 64 | * all functionality from the levels below it. |
| 65 | */ |
| 66 | enum class InstancedSupport { |
| 67 | kNone, |
| 68 | kBasic, |
| 69 | kMultisampled, |
| 70 | kMixedSampled |
| 71 | }; |
| 72 | |
| 73 | InstancedSupport instancedSupport() const { return fInstancedSupport; } |
| 74 | |
| 75 | bool avoidInstancedDrawsToFPTargets() const { return fAvoidInstancedDrawsToFPTargets; } |
| 76 | |
Eric Karl | 5c77975 | 2017-05-08 12:02:07 -0700 | [diff] [blame] | 77 | bool avoidStencilBuffers() const { return fAvoidStencilBuffers; } |
| 78 | |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 79 | /** |
cdalton | 8917d62 | 2015-05-06 13:40:21 -0700 | [diff] [blame] | 80 | * Indicates the capabilities of the fixed function blend unit. |
| 81 | */ |
| 82 | enum BlendEquationSupport { |
| 83 | kBasic_BlendEquationSupport, //<! Support to select the operator that |
| 84 | // combines src and dst terms. |
| 85 | kAdvanced_BlendEquationSupport, //<! Additional fixed function support for specific |
| 86 | // SVG/PDF blend modes. Requires blend barriers. |
| 87 | kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation support that does not |
| 88 | // require blend barriers, and permits overlap. |
| 89 | |
| 90 | kLast_BlendEquationSupport = kAdvancedCoherent_BlendEquationSupport |
| 91 | }; |
| 92 | |
| 93 | BlendEquationSupport blendEquationSupport() const { return fBlendEquationSupport; } |
| 94 | |
| 95 | bool advancedBlendEquationSupport() const { |
| 96 | return fBlendEquationSupport >= kAdvanced_BlendEquationSupport; |
| 97 | } |
| 98 | |
| 99 | bool advancedCoherentBlendEquationSupport() const { |
| 100 | return kAdvancedCoherent_BlendEquationSupport == fBlendEquationSupport; |
| 101 | } |
| 102 | |
cdalton | 1dd0542 | 2015-06-12 09:01:18 -0700 | [diff] [blame] | 103 | bool canUseAdvancedBlendEquation(GrBlendEquation equation) const { |
| 104 | SkASSERT(GrBlendEquationIsAdvanced(equation)); |
| 105 | return SkToBool(fAdvBlendEqBlacklist & (1 << equation)); |
| 106 | } |
| 107 | |
cdalton | 8917d62 | 2015-05-06 13:40:21 -0700 | [diff] [blame] | 108 | /** |
commit-bot@chromium.org | 160b478 | 2014-05-05 12:32:37 +0000 | [diff] [blame] | 109 | * Indicates whether GPU->CPU memory mapping for GPU resources such as vertex buffers and |
| 110 | * textures allows partial mappings or full mappings. |
| 111 | */ |
| 112 | enum MapFlags { |
| 113 | kNone_MapFlags = 0x0, //<! Cannot map the resource. |
| 114 | |
| 115 | kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be set for any of |
| 116 | // the other flags to have meaning.k |
| 117 | kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. |
| 118 | }; |
| 119 | |
| 120 | uint32_t mapBufferFlags() const { return fMapBufferFlags; } |
| 121 | |
robertphillips@google.com | 2d2e5c4 | 2013-10-30 21:30:43 +0000 | [diff] [blame] | 122 | // Scratch textures not being reused means that those scratch textures |
skia.committer@gmail.com | 7ed98df | 2013-10-31 07:01:53 +0000 | [diff] [blame] | 123 | // that we upload to (i.e., don't have a render target) will not be |
robertphillips@google.com | 2d2e5c4 | 2013-10-30 21:30:43 +0000 | [diff] [blame] | 124 | // recycled in the texture cache. This is to prevent ghosting by drivers |
| 125 | // (in particular for deferred architectures). |
commit-bot@chromium.org | b835652 | 2013-07-18 22:26:39 +0000 | [diff] [blame] | 126 | bool reuseScratchTextures() const { return fReuseScratchTextures; } |
robertphillips | 1b8e1b5 | 2015-06-24 06:54:10 -0700 | [diff] [blame] | 127 | bool reuseScratchBuffers() const { return fReuseScratchBuffers; } |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 128 | |
bsalomon | 7dbd45d | 2016-03-23 10:40:53 -0700 | [diff] [blame] | 129 | /// maximum number of attribute values per vertex |
| 130 | int maxVertexAttributes() const { return fMaxVertexAttributes; } |
| 131 | |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 132 | int maxRenderTargetSize() const { return fMaxRenderTargetSize; } |
| 133 | int maxTextureSize() const { return fMaxTextureSize; } |
bsalomon | 8c07b7a | 2015-11-02 11:36:52 -0800 | [diff] [blame] | 134 | /** This is the maximum tile size to use by GPU devices for rendering sw-backed images/bitmaps. |
| 135 | It is usually the max texture size, unless we're overriding it for testing. */ |
| 136 | int maxTileSize() const { SkASSERT(fMaxTileSize <= fMaxTextureSize); return fMaxTileSize; } |
bsalomon | c59a1df | 2015-06-01 07:13:42 -0700 | [diff] [blame] | 137 | |
cdalton | af8bc7d | 2016-02-05 09:35:20 -0800 | [diff] [blame] | 138 | int maxRasterSamples() const { return fMaxRasterSamples; } |
Greg Daniel | 81e7bf8 | 2017-07-19 14:47:42 -0400 | [diff] [blame] | 139 | |
| 140 | // Find a sample count greater than or equal to the requested count which is supported for a |
| 141 | // color buffer of the given config. If MSAA is not support for the config we will return 0. |
| 142 | virtual int getSampleCount(int requestedCount, GrPixelConfig config) const = 0; |
egdaniel | eed519e | 2016-01-15 11:36:18 -0800 | [diff] [blame] | 143 | |
csmartdalton | 9bc1187 | 2016-08-09 12:42:47 -0700 | [diff] [blame] | 144 | int maxWindowRectangles() const { return fMaxWindowRectangles; } |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 145 | |
Robert Phillips | b7b7e5f | 2017-05-22 13:23:19 -0400 | [diff] [blame] | 146 | virtual bool isConfigTexturable(GrPixelConfig) const = 0; |
bsalomon | 41e4384e | 2016-01-08 09:12:44 -0800 | [diff] [blame] | 147 | virtual bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const = 0; |
Brian Salomon | f9f4512 | 2016-11-29 11:59:17 -0500 | [diff] [blame] | 148 | virtual bool canConfigBeImageStorage(GrPixelConfig config) const = 0; |
commit-bot@chromium.org | 42dc813 | 2014-05-27 19:26:59 +0000 | [diff] [blame] | 149 | |
robertphillips | caef345 | 2015-11-11 13:18:11 -0800 | [diff] [blame] | 150 | bool suppressPrints() const { return fSuppressPrints; } |
| 151 | |
cdalton | 397536c | 2016-03-25 12:15:03 -0700 | [diff] [blame] | 152 | size_t bufferMapThreshold() const { |
| 153 | SkASSERT(fBufferMapThreshold >= 0); |
| 154 | return fBufferMapThreshold; |
joshualitt | 7224c86 | 2015-05-29 06:46:47 -0700 | [diff] [blame] | 155 | } |
bsalomon | 682c269 | 2015-05-22 14:01:46 -0700 | [diff] [blame] | 156 | |
egdaniel | 51c8d40 | 2015-08-06 10:54:13 -0700 | [diff] [blame] | 157 | bool fullClearIsFree() const { return fFullClearIsFree; } |
| 158 | |
Mike Klein | fc6c37b | 2016-09-27 09:34:10 -0400 | [diff] [blame] | 159 | /** True in environments that will issue errors if memory uploaded to buffers |
bsalomon | 7dea7b7 | 2015-08-19 08:26:51 -0700 | [diff] [blame] | 160 | is not initialized (even if not read by draw calls). */ |
| 161 | bool mustClearUploadedBufferData() const { return fMustClearUploadedBufferData; } |
| 162 | |
Jim Van Verth | fbdc080 | 2017-05-02 16:15:53 -0400 | [diff] [blame] | 163 | bool wireframeMode() const { return fWireframeMode; } |
| 164 | |
ethannicholas | 28ef445 | 2016-03-25 09:26:03 -0700 | [diff] [blame] | 165 | bool sampleShadingSupport() const { return fSampleShadingSupport; } |
| 166 | |
jvanverth | 84741b3 | 2016-09-30 08:39:02 -0700 | [diff] [blame] | 167 | bool fenceSyncSupport() const { return fFenceSyncSupport; } |
Brian Osman | 2c2bc11 | 2017-02-28 10:02:49 -0500 | [diff] [blame] | 168 | bool crossContextTextureSupport() const { return fCrossContextTextureSupport; } |
jvanverth | 84741b3 | 2016-09-30 08:39:02 -0700 | [diff] [blame] | 169 | |
Brian Salomon | 467921e | 2017-03-06 16:17:12 -0500 | [diff] [blame] | 170 | /** |
| 171 | * This is can be called before allocating a texture to be a dst for copySurface. This is only |
Robert Phillips | bf25d43 | 2017-04-07 10:08:53 -0400 | [diff] [blame] | 172 | * used for doing dst copies needed in blends, thus the src is always a GrRenderTargetProxy. It |
| 173 | * will populate the origin, config, and flags fields of the desc such that copySurface can |
Eric Karl | 7448088 | 2017-04-03 14:49:05 -0700 | [diff] [blame] | 174 | * efficiently succeed. rectsMustMatch will be set to true if the copy operation must ensure |
| 175 | * that the src and dest rects are identical. disallowSubrect will be set to true if copy rect |
| 176 | * must equal src's bounds. |
Brian Salomon | 467921e | 2017-03-06 16:17:12 -0500 | [diff] [blame] | 177 | */ |
Robert Phillips | bf25d43 | 2017-04-07 10:08:53 -0400 | [diff] [blame] | 178 | virtual bool initDescForDstCopy(const GrRenderTargetProxy* src, GrSurfaceDesc* desc, |
Eric Karl | 7448088 | 2017-04-03 14:49:05 -0700 | [diff] [blame] | 179 | bool* rectsMustMatch, bool* disallowSubrect) const = 0; |
Brian Salomon | 467921e | 2017-03-06 16:17:12 -0500 | [diff] [blame] | 180 | |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 181 | protected: |
bsalomon | 4ee6bd8 | 2015-05-27 13:23:23 -0700 | [diff] [blame] | 182 | /** Subclasses must call this at the end of their constructors in order to apply caps |
| 183 | overrides requested by the client. Note that overrides will only reduce the caps never |
| 184 | expand them. */ |
| 185 | void applyOptionsOverrides(const GrContextOptions& options); |
| 186 | |
bungeman | 6bd5284 | 2016-10-27 09:30:08 -0700 | [diff] [blame] | 187 | sk_sp<GrShaderCaps> fShaderCaps; |
jvanverth | e9c0fc6 | 2015-04-29 11:18:05 -0700 | [diff] [blame] | 188 | |
joshualitt | 83bc229 | 2015-06-18 14:18:02 -0700 | [diff] [blame] | 189 | bool fNPOTTextureTileSupport : 1; |
| 190 | bool fMipMapSupport : 1; |
brianosman | a635936 | 2016-03-21 06:55:37 -0700 | [diff] [blame] | 191 | bool fSRGBSupport : 1; |
brianosman | 35b784d | 2016-05-05 11:52:53 -0700 | [diff] [blame] | 192 | bool fSRGBWriteControl : 1; |
Brian Osman | 57bc3ea | 2017-07-27 09:58:11 -0400 | [diff] [blame] | 193 | bool fSRGBDecodeDisableSupport : 1; |
joshualitt | 83bc229 | 2015-06-18 14:18:02 -0700 | [diff] [blame] | 194 | bool fDiscardRenderTargetSupport : 1; |
| 195 | bool fReuseScratchTextures : 1; |
robertphillips | 1b8e1b5 | 2015-06-24 06:54:10 -0700 | [diff] [blame] | 196 | bool fReuseScratchBuffers : 1; |
joshualitt | 83bc229 | 2015-06-18 14:18:02 -0700 | [diff] [blame] | 197 | bool fGpuTracingSupport : 1; |
joshualitt | 83bc229 | 2015-06-18 14:18:02 -0700 | [diff] [blame] | 198 | bool fOversizedStencilSupport : 1; |
| 199 | bool fTextureBarrierSupport : 1; |
cdalton | eb79eea | 2016-02-26 10:39:34 -0800 | [diff] [blame] | 200 | bool fSampleLocationsSupport : 1; |
csmartdalton | 2b5f2cb | 2016-06-10 14:06:32 -0700 | [diff] [blame] | 201 | bool fMultisampleDisableSupport : 1; |
Chris Dalton | 1d61635 | 2017-05-31 12:51:23 -0600 | [diff] [blame] | 202 | bool fInstanceAttribSupport : 1; |
egdaniel | eed519e | 2016-01-15 11:36:18 -0800 | [diff] [blame] | 203 | bool fUsesMixedSamples : 1; |
csmartdalton | 485a120 | 2016-07-13 10:16:32 -0700 | [diff] [blame] | 204 | bool fPreferClientSideDynamicBuffers : 1; |
egdaniel | 51c8d40 | 2015-08-06 10:54:13 -0700 | [diff] [blame] | 205 | bool fFullClearIsFree : 1; |
bsalomon | 7dea7b7 | 2015-08-19 08:26:51 -0700 | [diff] [blame] | 206 | bool fMustClearUploadedBufferData : 1; |
robertphillips | 1b8e1b5 | 2015-06-24 06:54:10 -0700 | [diff] [blame] | 207 | |
bsalomon | 63b2196 | 2014-11-05 07:05:34 -0800 | [diff] [blame] | 208 | // Driver workaround |
joshualitt | 83bc229 | 2015-06-18 14:18:02 -0700 | [diff] [blame] | 209 | bool fUseDrawInsteadOfClear : 1; |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 210 | bool fAvoidInstancedDrawsToFPTargets : 1; |
Eric Karl | 5c77975 | 2017-05-08 12:02:07 -0700 | [diff] [blame] | 211 | bool fAvoidStencilBuffers : 1; |
bsalomon | 63b2196 | 2014-11-05 07:05:34 -0800 | [diff] [blame] | 212 | |
robertphillips | 6392668 | 2015-08-20 09:39:02 -0700 | [diff] [blame] | 213 | // ANGLE workaround |
| 214 | bool fPreferVRAMUseOverFlushes : 1; |
| 215 | |
ethannicholas | 28ef445 | 2016-03-25 09:26:03 -0700 | [diff] [blame] | 216 | bool fSampleShadingSupport : 1; |
jvanverth | 84741b3 | 2016-09-30 08:39:02 -0700 | [diff] [blame] | 217 | // TODO: this may need to be an enum to support different fence types |
| 218 | bool fFenceSyncSupport : 1; |
ethannicholas | 28ef445 | 2016-03-25 09:26:03 -0700 | [diff] [blame] | 219 | |
Brian Osman | 2c2bc11 | 2017-02-28 10:02:49 -0500 | [diff] [blame] | 220 | // Vulkan doesn't support this (yet) and some drivers have issues, too |
| 221 | bool fCrossContextTextureSupport : 1; |
| 222 | |
csmartdalton | e0d3629 | 2016-07-29 08:14:20 -0700 | [diff] [blame] | 223 | InstancedSupport fInstancedSupport; |
| 224 | |
cdalton | 8917d62 | 2015-05-06 13:40:21 -0700 | [diff] [blame] | 225 | BlendEquationSupport fBlendEquationSupport; |
cdalton | 1dd0542 | 2015-06-12 09:01:18 -0700 | [diff] [blame] | 226 | uint32_t fAdvBlendEqBlacklist; |
| 227 | GR_STATIC_ASSERT(kLast_GrBlendEquation < 32); |
| 228 | |
commit-bot@chromium.org | 160b478 | 2014-05-05 12:32:37 +0000 | [diff] [blame] | 229 | uint32_t fMapBufferFlags; |
cdalton | 397536c | 2016-03-25 12:15:03 -0700 | [diff] [blame] | 230 | int fBufferMapThreshold; |
commit-bot@chromium.org | 160b478 | 2014-05-05 12:32:37 +0000 | [diff] [blame] | 231 | |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 232 | int fMaxRenderTargetSize; |
bsalomon | 7dbd45d | 2016-03-23 10:40:53 -0700 | [diff] [blame] | 233 | int fMaxVertexAttributes; |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 234 | int fMaxTextureSize; |
bsalomon | 8c07b7a | 2015-11-02 11:36:52 -0800 | [diff] [blame] | 235 | int fMaxTileSize; |
egdaniel | eed519e | 2016-01-15 11:36:18 -0800 | [diff] [blame] | 236 | int fMaxColorSampleCount; |
| 237 | int fMaxStencilSampleCount; |
cdalton | af8bc7d | 2016-02-05 09:35:20 -0800 | [diff] [blame] | 238 | int fMaxRasterSamples; |
csmartdalton | 9bc1187 | 2016-08-09 12:42:47 -0700 | [diff] [blame] | 239 | int fMaxWindowRectangles; |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 240 | |
egdaniel | bc127a3 | 2014-09-19 12:07:43 -0700 | [diff] [blame] | 241 | private: |
Mike Klein | fc6c37b | 2016-09-27 09:34:10 -0400 | [diff] [blame] | 242 | virtual void onApplyOptionsOverrides(const GrContextOptions&) {} |
Brian Osman | 71a1889 | 2017-08-10 10:23:25 -0400 | [diff] [blame] | 243 | virtual void onDumpJSON(SkJSONWriter*) const {} |
egdaniel | b7e7d57 | 2015-11-04 04:23:53 -0800 | [diff] [blame] | 244 | |
robertphillips | caef345 | 2015-11-11 13:18:11 -0800 | [diff] [blame] | 245 | bool fSuppressPrints : 1; |
Jim Van Verth | fbdc080 | 2017-05-02 16:15:53 -0400 | [diff] [blame] | 246 | bool fWireframeMode : 1; |
bsalomon | 682c269 | 2015-05-22 14:01:46 -0700 | [diff] [blame] | 247 | |
bsalomon@google.com | c26d94f | 2013-03-25 18:19:00 +0000 | [diff] [blame] | 248 | typedef SkRefCnt INHERITED; |
| 249 | }; |
| 250 | |
| 251 | #endif |