8 #ifndef GrContextOptions_DEFINED
9 #define GrContextOptions_DEFINED
17 #include "include/private/gpu/ganesh/GrTypesPriv.h"
23 #if defined(SK_GANESH)
36 enum class ShaderCacheStrategy {
47 class SK_API PersistentCache {
49 virtual ~PersistentCache() =
default;
58 virtual void store(
const SkData& ,
const SkData& ) { SkASSERT(
false); }
65 this->store(key, data);
69 PersistentCache() =
default;
70 PersistentCache(
const PersistentCache&) =
delete;
71 PersistentCache& operator=(
const PersistentCache&) =
delete;
79 bool fSuppressPrints =
false;
87 Enable fSkipGLErrorChecks = Enable::kDefault;
93 int fMaxTextureSizeOverride = SK_MaxS32;
98 int fBufferMapThreshold = -1;
104 size_t fMinimumStagingBufferSize = 64 * 1024;
117 bool fDoManualMipmapping =
false;
125 bool fDisableCoverageCountingPaths =
true;
131 bool fDisableDistanceFieldPaths =
false;
137 bool fAllowPathMaskCaching =
true;
143 bool fDisableGpuYUVConversion =
false;
148 size_t fGlyphCacheTextureMaximumBytes = 2048 * 1024 * 4;
154 float fMinDistanceFieldFontSize = 18;
159 #if defined(SK_BUILD_FOR_ANDROID)
160 float fGlyphsAsPathsFontSize = 384;
161 #elif defined(SK_BUILD_FOR_MAC)
162 float fGlyphsAsPathsFontSize = 256;
164 float fGlyphsAsPathsFontSize = 324;
171 Enable fAllowMultipleGlyphCacheTextures = Enable::kDefault;
177 bool fAvoidStencilBuffers =
false;
182 Enable fUseDrawInsteadOfClear = Enable::kDefault;
190 Enable fReduceOpsTaskSplitting = Enable::kDefault;
197 bool fPreferExternalImagesOverES3 =
false;
204 bool fDisableDriverCorrectnessWorkarounds =
false;
209 int fRuntimeProgramCacheSize = 256;
214 PersistentCache* fPersistentCache =
nullptr;
222 ShaderCacheStrategy fShaderCacheStrategy = ShaderCacheStrategy::kBackendBinary;
228 ShaderErrorHandler* fShaderErrorHandler =
nullptr;
236 int fInternalMultisampleCount = 4;
247 int fMaxCachedVulkanSecondaryCommandBuffers = -1;
252 bool fSuppressMipmapSupport =
false;
258 bool fDisableTessellationPathRenderer =
false;
264 bool fEnableExperimentalHardwareTessellation =
false;
270 bool fSupportBilerpFromGlyphAtlas =
false;
276 bool fReducedShaderVariations =
false;
281 bool fAllowMSAAOnNewIntel =
false;
290 bool fAlwaysUseTexStorageWhenAvailable =
false;
301 #if defined(GR_TEST_UTILS)
310 bool fFailFlushTimeCallbacks =
false;
315 bool fSuppressDualSourceBlending =
false;
321 bool fSuppressAdvancedBlendEquations =
false;
326 bool fSuppressFramebufferFetch =
false;
331 bool fAllPathsVolatile =
false;
336 bool fWireframeMode =
false;
341 bool fClearAllTextures =
false;
346 bool fRandomGLOOM =
false;
351 bool fDisallowWriteAndTransferPixelRowBytes =
false;
356 GpuPathRenderers fGpuPathRenderers = GpuPathRenderers::kDefault;
364 int fResourceCacheLimitOverride = -1;
369 int fMaxTextureAtlasSize = 2048;
void * GrDirectContextDestroyedContext
Definition: GrTypes.h:193
void(* GrDirectContextDestroyedProc)(GrDirectContextDestroyedContext destroyedContext)
Definition: GrTypes.h:194
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
Definition: GrDriverBugWorkarounds.h:35
SkData holds an immutable data buffer.
Definition: SkData.h:25
Definition: SkExecutor.h:15
Light weight class for managing strings.
Definition: SkString.h:118
Abstract class to report errors when compiling shaders.
Definition: ShaderErrorHandler.h:17
Definition: GrContextOptions.h:376
Definition: GrContextOptions.h:375