diff --git a/src/gpu/GrSPIRVUniformHandler.cpp b/src/gpu/GrSPIRVUniformHandler.cpp index c7e48c690d..42ab5e4bf1 100644 --- a/src/gpu/GrSPIRVUniformHandler.cpp +++ b/src/gpu/GrSPIRVUniformHandler.cpp @@ -186,7 +186,7 @@ uint32_t get_ubo_offset(uint32_t* currentOffset, SkSLType type, int arrayCount) } // namespace GrGLSLUniformHandler::UniformHandle GrSPIRVUniformHandler::internalAddUniformArray( - const GrFragmentProcessor* owner, + const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, diff --git a/src/gpu/GrSPIRVUniformHandler.h b/src/gpu/GrSPIRVUniformHandler.h index 410f2d8f24..c88a979d7e 100644 --- a/src/gpu/GrSPIRVUniformHandler.h +++ b/src/gpu/GrSPIRVUniformHandler.h @@ -54,7 +54,7 @@ private: const char* samplerVariable(SamplerHandle handle) const override; skgpu::Swizzle samplerSwizzle(SamplerHandle handle) const override; void appendUniformDecls(GrShaderFlags visibility, SkString*) const override; - UniformHandle internalAddUniformArray(const GrFragmentProcessor* owner, + UniformHandle internalAddUniformArray(const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, diff --git a/src/gpu/gl/GrGLUniformHandler.cpp b/src/gpu/gl/GrGLUniformHandler.cpp index 7dcf69aed4..c9e629017e 100644 --- a/src/gpu/gl/GrGLUniformHandler.cpp +++ b/src/gpu/gl/GrGLUniformHandler.cpp @@ -26,7 +26,7 @@ bool valid_name(const char* name) { } GrGLSLUniformHandler::UniformHandle GrGLUniformHandler::internalAddUniformArray( - const GrFragmentProcessor* owner, + const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, diff --git a/src/gpu/gl/GrGLUniformHandler.h b/src/gpu/gl/GrGLUniformHandler.h index 1cafcfcb52..b9a1564235 100644 --- a/src/gpu/gl/GrGLUniformHandler.h +++ b/src/gpu/gl/GrGLUniformHandler.h @@ -44,7 +44,7 @@ private: , fUniforms(kUniformsPerBlock) , fSamplers(kUniformsPerBlock) {} - UniformHandle internalAddUniformArray(const GrFragmentProcessor* owner, + UniformHandle internalAddUniformArray(const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, diff --git a/src/gpu/glsl/GrGLSLUniformHandler.cpp b/src/gpu/glsl/GrGLSLUniformHandler.cpp index 0ceb88345b..6bb7287a6d 100644 --- a/src/gpu/glsl/GrGLSLUniformHandler.cpp +++ b/src/gpu/glsl/GrGLSLUniformHandler.cpp @@ -10,7 +10,7 @@ #include "src/gpu/glsl/GrGLSL.h" #include "src/gpu/glsl/GrGLSLShaderBuilder.h" -GrShaderVar GrGLSLUniformHandler::getUniformMapping(const GrFragmentProcessor& owner, +GrShaderVar GrGLSLUniformHandler::getUniformMapping(const GrProcessor& owner, SkString rawName) const { for (int i = this->numUniforms() - 1; i >= 0; i--) { const UniformInfo& u = this->uniform(i); @@ -21,7 +21,7 @@ GrShaderVar GrGLSLUniformHandler::getUniformMapping(const GrFragmentProcessor& o return GrShaderVar(); } -GrShaderVar GrGLSLUniformHandler::liftUniformToVertexShader(const GrFragmentProcessor& owner, +GrShaderVar GrGLSLUniformHandler::liftUniformToVertexShader(const GrProcessor& owner, SkString rawName) { for (int i = this->numUniforms() - 1; i >= 0; i--) { UniformInfo& u = this->uniform(i); diff --git a/src/gpu/glsl/GrGLSLUniformHandler.h b/src/gpu/glsl/GrGLSLUniformHandler.h index 92715c8376..c0e7ebf97c 100644 --- a/src/gpu/glsl/GrGLSLUniformHandler.h +++ b/src/gpu/glsl/GrGLSLUniformHandler.h @@ -17,6 +17,7 @@ class GrGLSLProgramBuilder; class GrGLSLShaderBuilder; +class GrProcessor; class GrSamplerState; class GrSurfaceProxy; @@ -32,10 +33,10 @@ struct GrGLSLBuiltinUniformHandles { class GrGLSLUniformHandler { public: struct UniformInfo { - GrShaderVar fVariable; - uint32_t fVisibility; - const GrFragmentProcessor* fOwner; - SkString fRawName; + GrShaderVar fVariable; + uint32_t fVisibility; + const GrProcessor* fOwner; + SkString fRawName; }; virtual ~GrGLSLUniformHandler() {} @@ -50,7 +51,7 @@ public: supported at this time. The actual uniform name will be mangled. If outName is not nullptr then it will refer to the final uniform name after return. Use the addUniformArray variant to add an array of uniforms. */ - UniformHandle addUniform(const GrFragmentProcessor* owner, + UniformHandle addUniform(const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, @@ -59,7 +60,7 @@ public: return this->addUniformArray(owner, visibility, type, name, 0, outName); } - UniformHandle addUniformArray(const GrFragmentProcessor* owner, + UniformHandle addUniformArray(const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, @@ -85,11 +86,11 @@ public: // Looks up a uniform that was added by 'owner' with the given 'rawName' (pre-mangling). // If there is no such uniform, a variable with type kVoid is returned. - GrShaderVar getUniformMapping(const GrFragmentProcessor& owner, SkString rawName) const; + GrShaderVar getUniformMapping(const GrProcessor& owner, SkString rawName) const; // Like getUniformMapping(), but if the uniform is found it also marks it as accessible in // the vertex shader. - GrShaderVar liftUniformToVertexShader(const GrFragmentProcessor& owner, SkString rawName); + GrShaderVar liftUniformToVertexShader(const GrProcessor& owner, SkString rawName); protected: explicit GrGLSLUniformHandler(GrGLSLProgramBuilder* program) : fProgramBuilder(program) {} @@ -118,7 +119,7 @@ private: return {}; } - virtual UniformHandle internalAddUniformArray(const GrFragmentProcessor* owner, + virtual UniformHandle internalAddUniformArray(const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, diff --git a/src/gpu/mtl/GrMtlUniformHandler.h b/src/gpu/mtl/GrMtlUniformHandler.h index 007f432f56..1b904f2b38 100644 --- a/src/gpu/mtl/GrMtlUniformHandler.h +++ b/src/gpu/mtl/GrMtlUniformHandler.h @@ -62,7 +62,7 @@ private: , fCurrentUBOMaxAlignment(0x0) { } - UniformHandle internalAddUniformArray(const GrFragmentProcessor* owner, + UniformHandle internalAddUniformArray(const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, diff --git a/src/gpu/mtl/GrMtlUniformHandler.mm b/src/gpu/mtl/GrMtlUniformHandler.mm index b3ce554948..99d17a358c 100644 --- a/src/gpu/mtl/GrMtlUniformHandler.mm +++ b/src/gpu/mtl/GrMtlUniformHandler.mm @@ -178,7 +178,7 @@ static uint32_t get_ubo_aligned_offset(uint32_t* currentOffset, } GrGLSLUniformHandler::UniformHandle GrMtlUniformHandler::internalAddUniformArray( - const GrFragmentProcessor* owner, + const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, diff --git a/src/gpu/vk/GrVkUniformHandler.cpp b/src/gpu/vk/GrVkUniformHandler.cpp index 9f85610168..82c4f52db5 100644 --- a/src/gpu/vk/GrVkUniformHandler.cpp +++ b/src/gpu/vk/GrVkUniformHandler.cpp @@ -198,7 +198,7 @@ GrVkUniformHandler::~GrVkUniformHandler() { } GrGLSLUniformHandler::UniformHandle GrVkUniformHandler::internalAddUniformArray( - const GrFragmentProcessor* owner, + const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name, diff --git a/src/gpu/vk/GrVkUniformHandler.h b/src/gpu/vk/GrVkUniformHandler.h index 9fd6eaa170..71a272c14c 100644 --- a/src/gpu/vk/GrVkUniformHandler.h +++ b/src/gpu/vk/GrVkUniformHandler.h @@ -102,7 +102,7 @@ private: , fCurrentOffsets{0, 0} { } - UniformHandle internalAddUniformArray(const GrFragmentProcessor* owner, + UniformHandle internalAddUniformArray(const GrProcessor* owner, uint32_t visibility, SkSLType type, const char* name,