17#define GL_CALL(X) GR_GL_CALL(this->glGpu()->glInterface(), X)
18#define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->glGpu()->glInterface(), R, X)
35 const char** outName) {
52 GLUniformInfo tempInfo;
58 tempInfo.fVisibility = visibility;
59 tempInfo.fOwner = owner;
61 tempInfo.fLocation = -1;
66 *outName = fUniforms.
back().fVariable.c_str();
71GrGLSLUniformHandler::SamplerHandle GrGLUniformHandler::addSampler(
79 constexpr char prefix =
'u';
84 GLUniformInfo tempInfo;
89 tempInfo.fOwner =
nullptr;
91 tempInfo.fLocation = -1;
97 return GrGLSLUniformHandler::SamplerHandle(fSamplers.
count() - 1);
107 for (
const UniformInfo& sampler : fSamplers.
items()) {
108 if (sampler.fVisibility & visibility) {
115void GrGLUniformHandler::bindUniformLocations(
GrGLuint programID,
const GrGLCaps& caps) {
120 uniform.fLocation = currUniform;
123 for (GLUniformInfo& sampler : fSamplers.
items()) {
124 GL_CALL(BindUniformLocation(programID, currUniform, sampler.fVariable.c_str()));
125 sampler.fLocation = currUniform;
131void GrGLUniformHandler::getUniformLocations(
GrGLuint programID,
const GrGLCaps& caps,
bool force) {
138 for (GLUniformInfo& sampler : fSamplers.
items()) {
140 GL_CALL_RET(location, GetUniformLocation(programID, sampler.fVariable.c_str()));
141 sampler.fLocation = location;
146const GrGLGpu* GrGLUniformHandler::glGpu()
const {
static SkSLType SkSLCombinedSamplerTypeForTextureType(GrTextureType type)
bool bindUniformLocationSupport() const
SkString nameVariable(char prefix, const char *name, bool mangle=true)
const GrShaderCaps * shaderCaps() const
const char * c_str() const
void appendDecl(const GrShaderCaps *, SkString *out) const
static constexpr const char RTADJUST_NAME[]
DEF_SWITCHES_START aot vmservice shared library name