#include "src/gpu/ganesh/effects/GrBezierEffect.h"
#include "include/core/SkColor.h"
#include "src/base/SkRandom.h"
#include "src/gpu/KeyBuilder.h"
#include "src/gpu/ganesh/GrColor.h"
#include "src/gpu/ganesh/GrShaderVar.h"
#include "src/gpu/ganesh/GrTestUtils.h"
#include "src/gpu/ganesh/glsl/GrGLSLFragmentShaderBuilder.h"
#include "src/gpu/ganesh/glsl/GrGLSLProgramDataManager.h"
#include "src/gpu/ganesh/glsl/GrGLSLUniformHandler.h"
#include "src/gpu/ganesh/glsl/GrGLSLVarying.h"
#include "src/gpu/ganesh/glsl/GrGLSLVertexGeoBuilder.h"
#include <iterator>
class GrConicEffect::Impl : public ProgramImpl { … };
void GrConicEffect::Impl::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { … }
GrConicEffect::~GrConicEffect() = default;
void GrConicEffect::addToKey(const GrShaderCaps& caps, skgpu::KeyBuilder* b) const { … }
std::unique_ptr<GrGeometryProcessor::ProgramImpl> GrConicEffect::makeProgramImpl(
const GrShaderCaps&) const { … }
GrConicEffect::GrConicEffect(const SkPMColor4f& color, const SkMatrix& viewMatrix, uint8_t coverage,
const SkMatrix& localMatrix, bool usesLocalCoords)
: … { … }
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(…)
#if defined(GPU_TEST_UTILS)
GrGeometryProcessor* GrConicEffect::TestCreate(GrProcessorTestData* d) {
GrColor color = GrTest::RandomColor(d->fRandom);
SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom);
SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom);
bool usesLocalCoords = d->fRandom->nextBool();
return GrConicEffect::Make(d->allocator(),
SkPMColor4f::FromBytes_RGBA(color),
viewMatrix,
*d->caps(),
localMatrix,
usesLocalCoords);
}
#endif
class GrQuadEffect::Impl : public ProgramImpl { … };
void GrQuadEffect::Impl::onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) { … }
GrQuadEffect::~GrQuadEffect() = default;
void GrQuadEffect::addToKey(const GrShaderCaps& caps, skgpu::KeyBuilder* b) const { … }
std::unique_ptr<GrGeometryProcessor::ProgramImpl> GrQuadEffect::makeProgramImpl(
const GrShaderCaps&) const { … }
GrQuadEffect::GrQuadEffect(const SkPMColor4f& color, const SkMatrix& viewMatrix, uint8_t coverage,
const SkMatrix& localMatrix, bool usesLocalCoords)
: … { … }
GR_DEFINE_GEOMETRY_PROCESSOR_TEST(…)
#if defined(GPU_TEST_UTILS)
GrGeometryProcessor* GrQuadEffect::TestCreate(GrProcessorTestData* d) {
GrColor color = GrTest::RandomColor(d->fRandom);
SkMatrix viewMatrix = GrTest::TestMatrix(d->fRandom);
SkMatrix localMatrix = GrTest::TestMatrix(d->fRandom);
bool usesLocalCoords = d->fRandom->nextBool();
return GrQuadEffect::Make(d->allocator(),
SkPMColor4f::FromBytes_RGBA(color),
viewMatrix,
*d->caps(),
localMatrix,
usesLocalCoords);
}
#endif