Skia
2DGraphicsLibrary
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GrContextOptions Struct Reference

Public Types

enum  GpuPathRenderers {
  kNone = 0, kDashLine = 1 << 0, kStencilAndCover = 1 << 1, kMSAA = 1 << 2,
  kAAHairline = 1 << 3, kAAConvex = 1 << 4, kAALinearizing = 1 << 5, kSmall = 1 << 6,
  kTessellating = 1 << 7, kDefault = 1 << 8, kAll = kDefault | (kDefault - 1), kDistanceField = kSmall
}
 Allows the client to include or exclude specific GPU path renderers.
 

Public Attributes

bool fSuppressPrints = false
 
int fMaxTextureSizeOverride = SK_MaxS32
 Overrides: These options override feature detection using backend API queries. More...
 
int fMaxTileSizeOverride = 0
 If non-zero, overrides the maximum size of a tile for sw-backed images and bitmaps rendered by SkGpuDevice. More...
 
bool fSuppressDualSourceBlending = false
 
int fBufferMapThreshold = -1
 the threshold in bytes above which we will use a buffer mapping API to map vertex and index buffers to CPU memory in order to update them. More...
 
bool fUseDrawInsteadOfPartialRenderTargetWrite = false
 some gpus have problems with partial writes of the rendertarget
 
bool fUseShaderSwizzling = false
 Force us to do all swizzling manually in the shader and don't rely on extensions to do swizzling. More...
 
bool fDoManualMipmapping = false
 Construct mipmaps manually, via repeated downsampling draw-calls. More...
 
bool fEnableInstancedRendering = false
 Enable instanced rendering as long as all required functionality is supported by the HW. More...
 
bool fAllowPathMaskCaching = false
 If true this allows path mask textures to be cached. More...
 
bool fRequireDecodeDisableForSRGB = true
 If true, sRGB support will not be enabled unless sRGB decoding can be disabled (via an extension). More...
 
bool fDisableGpuYUVConversion = false
 If true, the GPU will not be used to perform YUV -> RGB conversion when generating textures from codec-backed images.
 
bool fSuppressPathRendering = false
 If true, the caps will never report driver support for path rendering.
 
bool fWireframeMode = false
 Render everything in wireframe.
 
GpuPathRenderers fGpuPathRenderers = GpuPathRenderers::kAll
 
float fGlyphCacheTextureMaximumBytes = 2048 * 1024 * 4
 The maximum size of cache textures used for Skia's Glyph cache.
 
bool fAvoidStencilBuffers = false
 Bugs on certain drivers cause stencil buffers to leak. More...
 

Member Data Documentation

bool GrContextOptions::fAllowPathMaskCaching = false

If true this allows path mask textures to be cached.

This is only really useful if paths are commonly rendered at the same scale and fractional translation.

bool GrContextOptions::fAvoidStencilBuffers = false

Bugs on certain drivers cause stencil buffers to leak.

This flag causes Skia to avoid allocating stencil buffers and use alternate rasterization paths, avoiding the leak.

int GrContextOptions::fBufferMapThreshold = -1

the threshold in bytes above which we will use a buffer mapping API to map vertex and index buffers to CPU memory in order to update them.

A value of -1 means the GrContext should deduce the optimal value for this platform.

bool GrContextOptions::fDoManualMipmapping = false

Construct mipmaps manually, via repeated downsampling draw-calls.

This is used when the driver's implementation (glGenerateMipmap) contains bugs. This requires mipmap level and LOD control (ie desktop or ES3).

bool GrContextOptions::fEnableInstancedRendering = false

Enable instanced rendering as long as all required functionality is supported by the HW.

Instanced rendering is still experimental at this point and disabled by default.

int GrContextOptions::fMaxTextureSizeOverride = SK_MaxS32

Overrides: These options override feature detection using backend API queries.

These overrides can only reduce the feature set or limits, never increase them beyond the detected values.

int GrContextOptions::fMaxTileSizeOverride = 0

If non-zero, overrides the maximum size of a tile for sw-backed images and bitmaps rendered by SkGpuDevice.

bool GrContextOptions::fRequireDecodeDisableForSRGB = true

If true, sRGB support will not be enabled unless sRGB decoding can be disabled (via an extension).

If mixed use of "legacy" mode and sRGB/color-correct mode is not required, this can be set to false, which will significantly expand the number of devices that qualify for sRGB support.

bool GrContextOptions::fUseShaderSwizzling = false

Force us to do all swizzling manually in the shader and don't rely on extensions to do swizzling.


The documentation for this struct was generated from the following file: