#include "src/gpu/ganesh/ops/QuadPerEdgeAA.h"
#include "include/core/SkBlendMode.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkRect.h"
#include "include/private/base/SkMath.h"
#include "src/base/SkArenaAlloc.h"
#include "src/base/SkVx.h"
#include "src/core/SkSLTypeShared.h"
#include "src/gpu/KeyBuilder.h"
#include "src/gpu/ganesh/GrBuffer.h"
#include "src/gpu/ganesh/GrCaps.h"
#include "src/gpu/ganesh/GrColorSpaceXform.h"
#include "src/gpu/ganesh/GrGeometryProcessor.h"
#include "src/gpu/ganesh/GrMeshDrawTarget.h"
#include "src/gpu/ganesh/GrOpsRenderPass.h"
#include "src/gpu/ganesh/GrResourceProvider.h"
#include "src/gpu/ganesh/GrShaderVar.h"
#include "src/gpu/ganesh/geometry/GrQuadUtils.h"
#include "src/gpu/ganesh/glsl/GrGLSLColorSpaceXformHelper.h"
#include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
#include "src/gpu/ganesh/glsl/GrGLSLVarying.h"
#include "src/gpu/ganesh/glsl/GrGLSLVertexGeoBuilder.h"
#include <cstdint>
#include <memory>
#include <utility>
class GrBackendFormat;
class GrGLSLProgramDataManager;
namespace skgpu {
class Swizzle;
}
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
static_assert …;
namespace skgpu::ganesh::QuadPerEdgeAA {
namespace {
VertexSpec;
CoverageMode;
ColorType;
void write_quad_generic(VertexWriter* vb,
const VertexSpec& spec,
const GrQuad* deviceQuad,
const GrQuad* localQuad,
const float coverage[4],
const SkPMColor4f& color,
const SkRect& geomSubset,
const SkRect& texSubset) { … }
void write_2d_color(VertexWriter* vb,
const VertexSpec& spec,
const GrQuad* deviceQuad,
const GrQuad* localQuad,
const float coverage[4],
const SkPMColor4f& color,
const SkRect& geomSubset,
const SkRect& texSubset) { … }
void write_2d_uv(VertexWriter* vb,
const VertexSpec& spec,
const GrQuad* deviceQuad,
const GrQuad* localQuad,
const float coverage[4],
const SkPMColor4f& color,
const SkRect& geomSubset,
const SkRect& texSubset) { … }
void write_2d_color_uv(VertexWriter* vb,
const VertexSpec& spec,
const GrQuad* deviceQuad,
const GrQuad* localQuad,
const float coverage[4],
const SkPMColor4f& color,
const SkRect& geomSubset,
const SkRect& texSubset) { … }
void write_2d_cov_uv(VertexWriter* vb,
const VertexSpec& spec,
const GrQuad* deviceQuad,
const GrQuad* localQuad,
const float coverage[4],
const SkPMColor4f& color,
const SkRect& geomSubset,
const SkRect& texSubset) { … }
void write_2d_uv_strict(VertexWriter* vb,
const VertexSpec& spec,
const GrQuad* deviceQuad,
const GrQuad* localQuad,
const float coverage[4],
const SkPMColor4f& color,
const SkRect& geomSubset,
const SkRect& texSubset) { … }
void write_2d_color_uv_strict(VertexWriter* vb,
const VertexSpec& spec,
const GrQuad* deviceQuad,
const GrQuad* localQuad,
const float coverage[4],
const SkPMColor4f& color,
const SkRect& geomSubset,
const SkRect& texSubset) { … }
void write_2d_cov_uv_strict(VertexWriter* vb,
const VertexSpec& spec,
const GrQuad* deviceQuad,
const GrQuad* localQuad,
const float coverage[4],
const SkPMColor4f& color,
const SkRect& geomSubset,
const SkRect& texSubset) { … }
}
IndexBufferOption CalcIndexBufferOption(GrAAType aa, int numQuads) { … }
ColorType MinColorType(SkPMColor4f color) { … }
Tessellator::WriteQuadProc Tessellator::GetWriteQuadProc(const VertexSpec& spec) { … }
Tessellator::Tessellator(const VertexSpec& spec, char* vertices)
: … { … }
void Tessellator::append(GrQuad* deviceQuad, GrQuad* localQuad,
const SkPMColor4f& color, const SkRect& uvSubset, GrQuadAAFlags aaFlags) { … }
sk_sp<const GrBuffer> GetIndexBuffer(GrMeshDrawTarget* target,
IndexBufferOption indexBufferOption) { … }
int QuadLimit(IndexBufferOption option) { … }
void IssueDraw(const GrCaps& caps, GrOpsRenderPass* renderPass, const VertexSpec& spec,
int runningQuadCount, int quadsInDraw, int maxVerts, int absVertBufferOffset) { … }
int VertexSpec::deviceDimensionality() const { … }
int VertexSpec::localDimensionality() const { … }
CoverageMode VertexSpec::coverageMode() const { … }
size_t VertexSpec::vertexSize() const { … }
class QuadPerEdgeAAGeometryProcessor : public GrGeometryProcessor { … };
GrGeometryProcessor* MakeProcessor(SkArenaAlloc* arena, const VertexSpec& spec) { … }
GrGeometryProcessor* MakeTexturedProcessor(SkArenaAlloc* arena,
const VertexSpec& spec,
const GrShaderCaps& caps,
const GrBackendFormat& backendFormat,
GrSamplerState samplerState,
const skgpu::Swizzle& swizzle,
sk_sp<GrColorSpaceXform> textureColorSpaceXform,
Saturate saturate) { … }
}