44 const char*
name()
const override {
return "SampleCoordEffect"; }
46 std::unique_ptr<GrFragmentProcessor>
clone()
const override {
59 std::unique_ptr<ProgramImpl> onMakeProgramImpl()
const override;
63std::unique_ptr<GrFragmentProcessor::ProgramImpl> SampleCoordEffect::onMakeProgramImpl()
const {
66 void emitCode(EmitArgs&
args)
override {
68 SkString s1 = this->invokeChild(0,
args,
"float2(sk_FragCoord.x, sk_FragCoord.y)");
69 SkString s2 = this->invokeChild(0,
args,
"float2(sk_FragCoord.x, 512-sk_FragCoord.y)");
74 return std::make_unique<Impl>();
92 std::unique_ptr<GrFragmentProcessor> imgFP =
96 sfc->fillWithFP(std::move(
fp));
std::tuple< GrSurfaceProxyView, GrColorType > GrMakeCachedBitmapProxyView(GrRecordingContext *rContext, const SkBitmap &bitmap, std::string_view label, skgpu::Mipmapped mipmapped)
GrFragmentProcessor(ClassID classID, OptimizationFlags optimizationFlags)
void registerChild(std::unique_ptr< GrFragmentProcessor > child, SkSL::SampleUsage sampleUsage=SkSL::SampleUsage::PassThrough())
@ kNone_OptimizationFlags
void codeAppendf(const char format[],...) SK_PRINTF_LIKE(2
static std::unique_ptr< GrFragmentProcessor > Make(GrSurfaceProxyView, SkAlphaType, const SkMatrix &=SkMatrix::I(), GrSamplerState::Filter=GrSamplerState::Filter::kNearest, GrSamplerState::MipmapMode mipmapMode=GrSamplerState::MipmapMode::kNone)
std::unique_ptr< GrFragmentProcessor > clone() const override
void onAddToKey(const GrShaderCaps &, skgpu::KeyBuilder *) const override
SampleCoordEffect(std::unique_ptr< GrFragmentProcessor > child)
bool onIsEqual(const GrFragmentProcessor &) const override
const char * name() const override
static constexpr GrProcessor::ClassID CLASS_ID
SkAlphaType alphaType() const
static SampleUsage Explicit()
const char * c_str() const
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
DEF_SIMPLE_GPU_GM_BG(fpcoordinateoverride, rContext, canvas, 512, 512, ToolUtils::color_to_565(0xFF66AA99))
const myers::Point & get< 0 >(const myers::Segment &s)
SurfaceFillContext * TopDeviceSurfaceFillContext(const SkCanvas *canvas)