8#ifndef skgpu_ganesh_AtlasTextOp_DEFINED
9#define skgpu_ganesh_AtlasTextOp_DEFINED
57 for (
const Geometry* g = fHead; g !=
nullptr;) {
64 void*
operator new(
size_t s);
65 void operator delete(
void*
b)
noexcept;
113 const char*
name()
const override {
return "AtlasTextOp"; }
125#if !defined(SK_DISABLE_SDF_TEXT)
126 kAliasedDistanceField,
127 kGrayscaleDistanceField,
130 kLast = kLCDDistanceField
145 int fGlyphsToFlush = 0;
163 bool useGammaCorrectDistanceTable,
173 void addGeometry(Geometry* geometry) {
177 fTail = &(*fTail)->
fNext;
178 }
while (*fTail !=
nullptr);
181 void onCreateProgramInfo(
const GrCaps*,
184 bool usesMSAASurface,
206#if defined(GR_TEST_UTILS)
207 SkString onDumpInfo()
const override;
211 switch (this->maskType()) {
217#if !defined(SK_DISABLE_SDF_TEXT)
228#if !defined(SK_DISABLE_SDF_TEXT)
229 bool usesDistanceFields()
const {
245 inline void createDrawForGeneratedGlyphs(
252#if !defined(SK_DISABLE_SDF_TEXT)
257 unsigned int numActiveViews)
const;
264 uint32_t fDFGPFlags : 10;
265 uint32_t fMaskType : 3;
266 uint32_t fUsesLocalCoords : 1;
267 uint32_t fNeedsGlyphTransform : 1;
268 uint32_t fHasPerspective : 1;
269 uint32_t fUseGammaCorrectDistanceTable : 1;
270 static_assert(
kMaskTypeCount <= 8,
"MaskType does not fit in 3 bits");
271#if !defined(SK_DISABLE_SDF_TEXT)
280 const SkColor fLuminanceColor{0};
282 Geometry* fHead{
nullptr};
283 Geometry** fTail{&fHead};
@ kInvalid_DistanceFieldEffectFlag
#define DEFINE_OP_CLASS_ID
std::function< void(GrSurfaceProxy *, skgpu::Mipmapped)> GrVisitProxyFunc
static float next(float f)
GrGeometryProcessor * fGeometryProcessor
sk_sp< const GrBuffer > fIndexBuffer
sk_sp< const GrBuffer > fVertexBuffer
const GrSurfaceProxy ** fPrimProcProxies
GrMeshDrawOp(uint32_t classID)
DEFINE_OP_CLASS_ID ~AtlasTextOp() override
const char * name() const override
GrProcessorSet::Analysis finalize(const GrCaps &, const GrAppliedClip *, GrClampType) override
static constexpr int kMaskTypeCount
FixedFunctionFlags fixedFunctionFlags() const override
void visitProxies(const GrVisitProxyFunc &) const override
@ kGrayscaleDistanceField
clipRect(r.rect, r.opAA.op(), r.opAA.aa())) template<> void Draw
@ kA565
2-bytes per pixel, RGB represent 3-channel LCD coverage
@ kARGB
4-bytes per pixel, color format
static Geometry * Make(const sktext::gpu::AtlasSubRun &subRun, const SkMatrix &drawMatrix, SkPoint drawOrigin, SkIRect clipRect, sk_sp< SkRefCnt > &&supportData, const SkPMColor4f &color, SkArenaAlloc *alloc)
void fillVertexData(void *dst, int offset, int count) const
Geometry(const sktext::gpu::AtlasSubRun &subRun, const SkMatrix &drawMatrix, SkPoint drawOrigin, SkIRect clipRect, sk_sp< SkRefCnt > &&supportData, const SkPMColor4f &color)
const SkMatrix fDrawMatrix
const sktext::gpu::AtlasSubRun & fSubRun
sk_sp< SkRefCnt > fSupportDataKeepAlive
const SkPoint fDrawOrigin