diff --git a/src/core/SkDraw_vertices.cpp b/src/core/SkDraw_vertices.cpp index c0161cd530..1b21424bad 100644 --- a/src/core/SkDraw_vertices.cpp +++ b/src/core/SkDraw_vertices.cpp @@ -16,6 +16,7 @@ #include "src/core/SkRasterClip.h" #include "src/core/SkRasterPipeline.h" #include "src/core/SkScan.h" +#include "src/core/SkVM.h" #include "src/core/SkVertState.h" #include "src/core/SkVerticesPriv.h" #include "src/shaders/SkComposeShader.h" @@ -147,6 +148,15 @@ protected: return true; } + skvm::Color onProgram(skvm::Builder*, + skvm::Coord, skvm::Coord, skvm::Color, + const SkMatrixProvider&, const SkMatrix*, + SkFilterQuality, const SkColorInfo&, + skvm::Uniforms*, SkArenaAlloc*) const override { + // TODO? + return {}; + } + private: bool isOpaque() const override { return fIsOpaque; } // For serialization. This will never be called. diff --git a/src/shaders/SkPerlinNoiseShader.cpp b/src/shaders/SkPerlinNoiseShader.cpp index 5260ff32bf..73f6d0a88d 100644 --- a/src/shaders/SkPerlinNoiseShader.cpp +++ b/src/shaders/SkPerlinNoiseShader.cpp @@ -16,6 +16,7 @@ #include "src/core/SkArenaAlloc.h" #include "src/core/SkMatrixProvider.h" #include "src/core/SkReadBuffer.h" +#include "src/core/SkVM.h" #include "src/core/SkWriteBuffer.h" #if SK_SUPPORT_GPU @@ -301,6 +302,15 @@ public: std::unique_ptr asFragmentProcessor(const GrFPArgs&) const override; #endif + skvm::Color onProgram(skvm::Builder*, + skvm::Coord, skvm::Coord, skvm::Color, + const SkMatrixProvider&, const SkMatrix*, + SkFilterQuality, const SkColorInfo&, + skvm::Uniforms*, SkArenaAlloc*) const override { + // TODO? + return {}; + } + protected: void flatten(SkWriteBuffer&) const override; #ifdef SK_ENABLE_LEGACY_SHADERCONTEXT diff --git a/src/shaders/SkShader.cpp b/src/shaders/SkShader.cpp index 4e8c79f178..0ee0913b4b 100644 --- a/src/shaders/SkShader.cpp +++ b/src/shaders/SkShader.cpp @@ -238,15 +238,6 @@ skvm::Color SkShaderBase::program(skvm::Builder* p, return {}; } -skvm::Color SkShaderBase::onProgram(skvm::Builder*, - skvm::Coord device, skvm::Coord local, skvm::Color paint, - const SkMatrixProvider&, const SkMatrix* localM, - SkFilterQuality quality, const SkColorInfo& dst, - skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const { - // SkDebugf("cannot onProgram %s\n", this->getTypeName()); - return {}; -} - // need a cheap way to invert the alpha channel of a shader (i.e. 1 - a) sk_sp SkShaderBase::makeInvertAlpha() const { return this->makeWithColorFilter(SkColorFilters::Blend(0xFFFFFFFF, SkBlendMode::kSrcOut)); diff --git a/src/shaders/SkShaderBase.h b/src/shaders/SkShaderBase.h index 1e74f833e9..35a5beb9a8 100644 --- a/src/shaders/SkShaderBase.h +++ b/src/shaders/SkShaderBase.h @@ -252,7 +252,7 @@ private: skvm::Coord device, skvm::Coord local, skvm::Color paint, const SkMatrixProvider&, const SkMatrix* localM, SkFilterQuality quality, const SkColorInfo& dst, - skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const; + skvm::Uniforms* uniforms, SkArenaAlloc* alloc) const = 0; using INHERITED = SkShader; };