diff options
Diffstat (limited to 'include/gpu/GrContextOptions.h')
-rw-r--r-- | include/gpu/GrContextOptions.h | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h index a2e4288c66..6c42ec66ad 100644 --- a/include/gpu/GrContextOptions.h +++ b/include/gpu/GrContextOptions.h @@ -9,6 +9,7 @@ #define GrContextOptions_DEFINED #include "SkTypes.h" +#include "GrTypes.h" struct GrContextOptions { GrContextOptions() {} @@ -61,10 +62,6 @@ struct GrContextOptions { Instanced rendering is still experimental at this point and disabled by default. */ bool fEnableInstancedRendering = false; - /** Disables distance field rendering for paths. Distance field computation can be expensive - and yields no benefit if a path is not rendered multiple times with different transforms */ - bool fDisableDistanceFieldPaths = 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. @@ -72,13 +69,6 @@ struct GrContextOptions { bool fAllowPathMaskCaching = false; /** - * Force all path draws to go through through the sw-rasterize-to-texture code path (assuming - * the path is not recognized as a simpler shape (e.g. a rrect). This is intended for testing - * purposes. - */ - bool fForceSWPathMasks = false; - - /** * 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 @@ -91,6 +81,34 @@ struct GrContextOptions { * textures from codec-backed images. */ bool fDisableGpuYUVConversion = false; + + /** + * If true, the caps will never report driver support for path rendering. + */ + bool fSuppressPathRendering = false; + + /** + * Allows the client to include or exclude specific GPU path renderers. + */ + enum class GpuPathRenderers { + kNone = 0, // Always use sofware masks. + kDashLine = 1 << 0, + kStencilAndCover = 1 << 1, + kMSAA = 1 << 2, + kAAHairline = 1 << 3, + kAAConvex = 1 << 4, + kAALinearizing = 1 << 5, + kPLS = 1 << 6, + kDistanceField = 1 << 7, + kTesselating = 1 << 8, + kDefault = 1 << 9, + + kAll = kDefault | (kDefault - 1) + }; + + GpuPathRenderers fGpuPathRenderers = GpuPathRenderers::kAll; }; +GR_MAKE_BITFIELD_CLASS_OPS(GrContextOptions::GpuPathRenderers) + #endif |