#include "src/text/gpu/VertexFiller.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPoint.h"
#include "include/core/SkRect.h"
#include "include/core/SkScalar.h"
#include "include/core/SkTypes.h"
#include "include/private/base/SkTLogic.h"
#include "src/core/SkReadBuffer.h"
#include "src/core/SkWriteBuffer.h"
#include "src/gpu/AtlasTypes.h"
#include "src/text/gpu/SubRunAllocator.h"
#include "src/text/gpu/SubRunContainer.h"
#include <cstdint>
#include <optional>
#if defined(SK_GANESH) || defined(SK_USE_LEGACY_GANESH_TEXT_APIS)
#include "include/core/SkPoint3.h"
#include "src/base/SkZip.h"
#include "src/gpu/ganesh/ops/AtlasTextOp.h"
#include "src/text/gpu/Glyph.h"
#include <initializer_list>
#endif
MaskFormat;
namespace sktext::gpu {
VertexFiller::VertexFiller(MaskFormat maskFormat,
const SkMatrix &creationMatrix,
SkRect creationBounds,
SkSpan<const SkPoint> leftTop,
bool canDrawDirect)
: … { … }
VertexFiller VertexFiller::Make(MaskFormat maskType,
const SkMatrix &creationMatrix,
SkRect creationBounds,
SkSpan<const SkPoint> positions,
SubRunAllocator *alloc,
FillerType fillerType) { … }
std::optional<VertexFiller> VertexFiller::MakeFromBuffer(SkReadBuffer &buffer,
SubRunAllocator *alloc) { … }
void VertexFiller::flatten(SkWriteBuffer &buffer) const { … }
SkMatrix VertexFiller::viewDifference(const SkMatrix &positionMatrix) const { … }
static std::tuple<bool, SkVector> can_use_direct(
const SkMatrix& creationMatrix, const SkMatrix& positionMatrix) { … }
struct AtlasPt { … };
#if defined(SK_GANESH) || defined(SK_USE_LEGACY_GANESH_TEXT_APIS)
struct Mask2DVertex { … };
struct ARGB2DVertex { … };
struct Mask3DVertex { … };
struct ARGB3DVertex { … };
size_t VertexFiller::vertexStride(const SkMatrix &matrix) const { … }
void fillDirectNoClipping(SkZip<Mask2DVertex[4], const Glyph*, const SkPoint> quadData,
GrColor color,
SkPoint originOffset) { … }
template <typename Rect>
static auto LTBR(const Rect& r) { … }
template<typename Quad, typename VertexData>
static void fillDirectClipped(SkZip<Quad, const Glyph*, const VertexData> quadData,
GrColor color,
SkPoint originOffset,
SkIRect* clip = nullptr) { … }
template<typename Quad, typename VertexData>
static void fill2D(SkZip<Quad, const Glyph*, const VertexData> quadData,
GrColor color,
const SkMatrix& viewDifference) { … }
template<typename Quad, typename VertexData>
static void fill3D(SkZip<Quad, const Glyph*, const VertexData> quadData,
GrColor color,
const SkMatrix& viewDifference) { … }
void VertexFiller::fillVertexData(int offset, int count,
SkSpan<const Glyph*> glyphs,
GrColor color,
const SkMatrix& positionMatrix,
SkIRect clip,
void* vertexBuffer) const { … }
AtlasTextOp;
AtlasTextOp::MaskType VertexFiller::opMaskType() const { … }
#endif
bool VertexFiller::isLCD() const { … }
std::tuple<bool, SkRect> VertexFiller::deviceRectAndCheckTransform(
const SkMatrix &positionMatrix) const { … }
}