Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
skgpu::graphite::ContextOptions Struct Reference

#include <ContextOptions.h>

Public Member Functions

 ContextOptions ()
 

Public Attributes

bool fDisableDriverCorrectnessWorkarounds = false
 
skgpu::ShaderErrorHandlerfShaderErrorHandler = nullptr
 
int fInternalMultisampleCount = 4
 
bool fClientWillExternallySynchronizeAllThreads = false
 
size_t fGlyphCacheTextureMaximumBytes = 2048 * 1024 * 4
 
float fMinDistanceFieldFontSize = 18
 
float fGlyphsAsPathsFontSize = 324
 
int fMaxPathAtlasTextureSize = 8192
 
bool fAllowMultipleAtlasTextures = true
 
bool fSupportBilerpFromGlyphAtlas = false
 
bool fDisableCachedGlyphUploads = false
 
size_t fGpuBudgetInBytes = kDefaultContextBudget
 
ContextOptionsPrivfOptionsPriv = nullptr
 

Static Public Attributes

static constexpr size_t kDefaultContextBudget = 256 * (1 << 20)
 

Detailed Description

Definition at line 20 of file ContextOptions.h.

Constructor & Destructor Documentation

◆ ContextOptions()

skgpu::graphite::ContextOptions::ContextOptions ( )
inline

Definition at line 21 of file ContextOptions.h.

21{}

Member Data Documentation

◆ fAllowMultipleAtlasTextures

bool skgpu::graphite::ContextOptions::fAllowMultipleAtlasTextures = true

Can the glyph and path atlases use multiple textures. If allowed, each texture's size is bound by fGlyphCacheTextureMaximumBytes and fMaxPathAtlasTextureSize, respectively.

Definition at line 82 of file ContextOptions.h.

◆ fClientWillExternallySynchronizeAllThreads

bool skgpu::graphite::ContextOptions::fClientWillExternallySynchronizeAllThreads = false

Will the client make sure to only ever be executing one thread that uses the Context and all derived classes (e.g. Recorders, Recordings, etc.) at a time. If so we can possibly make some objects (e.g. VulkanMemoryAllocator) not thread safe to improve single thread performance.

Definition at line 49 of file ContextOptions.h.

◆ fDisableCachedGlyphUploads

bool skgpu::graphite::ContextOptions::fDisableCachedGlyphUploads = false

Disable caching of glyph uploads at the start of each Recording. These can add additional overhead and are only necessary if Recordings are replayed or played out of order.

Deprecated, now only used to set requireOrderedRecordings Caps.

Definition at line 91 of file ContextOptions.h.

◆ fDisableDriverCorrectnessWorkarounds

bool skgpu::graphite::ContextOptions::fDisableDriverCorrectnessWorkarounds = false

Disables correctness workarounds that are enabled for particular GPUs, OSes, or drivers. This does not affect code path choices that are made for perfomance reasons nor does it override other ContextOption settings.

Definition at line 28 of file ContextOptions.h.

◆ fGlyphCacheTextureMaximumBytes

size_t skgpu::graphite::ContextOptions::fGlyphCacheTextureMaximumBytes = 2048 * 1024 * 4

The maximum size of cache textures used for Skia's Glyph cache.

Definition at line 54 of file ContextOptions.h.

◆ fGlyphsAsPathsFontSize

float skgpu::graphite::ContextOptions::fGlyphsAsPathsFontSize = 324

Above this threshold size in device space glyphs are drawn as individual paths.

Definition at line 70 of file ContextOptions.h.

◆ fGpuBudgetInBytes

size_t skgpu::graphite::ContextOptions::fGpuBudgetInBytes = kDefaultContextBudget

What is the budget for GPU resources allocated and held by the Context.

Definition at line 97 of file ContextOptions.h.

◆ fInternalMultisampleCount

int skgpu::graphite::ContextOptions::fInternalMultisampleCount = 4

Specifies the number of samples Graphite should use when performing internal draws with MSAA (hardware capabilities permitting).

If <= 1, Graphite will disable internal code paths that use multisampling.

Definition at line 42 of file ContextOptions.h.

◆ fMaxPathAtlasTextureSize

int skgpu::graphite::ContextOptions::fMaxPathAtlasTextureSize = 8192

The maximum size of textures used for Skia's PathAtlas caches.

Definition at line 76 of file ContextOptions.h.

◆ fMinDistanceFieldFontSize

float skgpu::graphite::ContextOptions::fMinDistanceFieldFontSize = 18

Below this threshold size in device space distance field fonts won't be used. Distance field fonts don't support hinting which is more important at smaller sizes.

Definition at line 60 of file ContextOptions.h.

◆ fOptionsPriv

ContextOptionsPriv* skgpu::graphite::ContextOptions::fOptionsPriv = nullptr

Private options that are only meant for testing within Skia's tools.

Definition at line 102 of file ContextOptions.h.

◆ fShaderErrorHandler

skgpu::ShaderErrorHandler* skgpu::graphite::ContextOptions::fShaderErrorHandler = nullptr

If present, use this object to report shader compilation failures. If not, report failures via SkDebugf and assert.

Definition at line 34 of file ContextOptions.h.

◆ fSupportBilerpFromGlyphAtlas

bool skgpu::graphite::ContextOptions::fSupportBilerpFromGlyphAtlas = false

Definition at line 83 of file ContextOptions.h.

◆ kDefaultContextBudget

constexpr size_t skgpu::graphite::ContextOptions::kDefaultContextBudget = 256 * (1 << 20)
staticconstexpr

Definition at line 93 of file ContextOptions.h.


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