8#ifndef GrDistanceFieldGeoProc_DEFINED
9#define GrDistanceFieldGeoProc_DEFINED
11#if !defined(SK_DISABLE_SDF_TEXT)
25namespace skgpu {
class KeyBuilder; }
77#ifdef SK_GAMMA_APPLY_TO_A8
85 const SkMatrix& localMatrixIfUsesLocalCoords) {
86 return arena->
make([&](
void* ptr) {
88 caps, views, numActiveViews,
params,
lum,
flags, localMatrixIfUsesLocalCoords);
98 const SkMatrix& localMatrixIfUsesLocalCoords) {
99 return arena->
make([&](
void* ptr) {
101 caps, views, numActiveViews,
params,
flags, localMatrixIfUsesLocalCoords);
108 const char*
name()
const override {
return "DistanceFieldA8Text"; }
123#ifdef SK_GAMMA_APPLY_TO_A8
124 float distanceAdjust,
129 const TextureSampler& onTextureSampler(
int i)
const override {
return fTextureSamplers[
i]; }
138#ifdef SK_GAMMA_APPLY_TO_A8
139 float fDistanceAdjust;
162 return arena->
make([&](
void* ptr) {
170 const char*
name()
const override {
return "DistanceFieldPath"; }
188 const TextureSampler& onTextureSampler(
int i)
const override {
return fTextureSamplers[
i]; }
224 return !(*
this == wa);
235 const SkMatrix& localMatrixIfUsesLocalCoords) {
236 return arena->
make([&](
void* ptr) {
238 distanceAdjust,
flags,
239 localMatrixIfUsesLocalCoords);
245 const char*
name()
const override {
return "DistanceFieldLCDText"; }
260 const TextureSampler& onTextureSampler(
int i)
const override {
return fTextureSamplers[
i]; }
265 DistanceAdjust fDistanceAdjust;
GrDistanceFieldEffectFlags
@ kGammaCorrect_DistanceFieldEffectFlag
@ kWideColor_DistanceFieldEffectFlag
@ kUseLCD_DistanceFieldEffectFlag
@ kPerspective_DistanceFieldEffectFlag
@ kSimilarity_DistanceFieldEffectFlag
@ kBGR_DistanceFieldEffectFlag
@ kScaleOnly_DistanceFieldEffectFlag
@ kInvalid_DistanceFieldEffectFlag
@ kAliased_DistanceFieldEffectFlag
@ kUniformScale_DistanceFieldEffectMask
@ kPath_DistanceFieldEffectMask
@ kNonLCD_DistanceFieldEffectMask
@ kPortrait_DistanceFieldEffectFlag
@ kLCD_DistanceFieldEffectMask
#define GR_DECLARE_GEOMETRY_PROCESSOR_TEST
#define INHERITED(method,...)
const char * name() const override
static GrGeometryProcessor * Make(SkArenaAlloc *arena, const GrShaderCaps &caps, const GrSurfaceProxyView *views, int numActiveViews, GrSamplerState params, uint32_t flags, const SkMatrix &localMatrixIfUsesLocalCoords)
void addNewViews(const GrSurfaceProxyView *views, int numViews, GrSamplerState)
~GrDistanceFieldA8TextGeoProc() override
void addToKey(const GrShaderCaps &, skgpu::KeyBuilder *) const override
std::unique_ptr< ProgramImpl > makeProgramImpl(const GrShaderCaps &) const override
static constexpr int kMaxTextures
static GrGeometryProcessor * Make(SkArenaAlloc *arena, const GrShaderCaps &caps, const GrSurfaceProxyView *views, int numActiveViews, GrSamplerState params, DistanceAdjust distanceAdjust, uint32_t flags, const SkMatrix &localMatrixIfUsesLocalCoords)
void addNewViews(const GrSurfaceProxyView *, int numActiveViews, GrSamplerState)
~GrDistanceFieldLCDTextGeoProc() override
std::unique_ptr< ProgramImpl > makeProgramImpl(const GrShaderCaps &) const override
static constexpr int kMaxTextures
const char * name() const override
void addToKey(const GrShaderCaps &, skgpu::KeyBuilder *) const override
void addNewViews(const GrSurfaceProxyView *, int numActiveViews, GrSamplerState)
void addToKey(const GrShaderCaps &, skgpu::KeyBuilder *) const override
~GrDistanceFieldPathGeoProc() override
const char * name() const override
static GrGeometryProcessor * Make(SkArenaAlloc *arena, const GrShaderCaps &caps, const GrSurfaceProxyView *views, int numActiveViews, GrSamplerState params, const SkMatrix &localMatrix, uint32_t flags)
static constexpr int kMaxTextures
std::unique_ptr< ProgramImpl > makeProgramImpl(const GrShaderCaps &) const override
GrGeometryProcessor(ClassID)
auto make(Ctor &&ctor) -> decltype(ctor(nullptr))
const EmbeddedViewParams * params
FlutterSemanticsFlag flags
static float lum(float r, float g, float b)
bool operator==(const DistanceAdjust &wa) const
bool operator!=(const DistanceAdjust &wa) const
static DistanceAdjust Make(SkScalar r, SkScalar g, SkScalar b)