GrGLProgramBuilder::SeparableVaryingHandle GrGLProgramBuilder::addSeparableVarying(const char*, GrGLVertToFrag*, GrSLPrecision) { // This call is not used for non-NVPR backends. However, the polymorphism between // GrPrimitiveProcessor, GrGLPrimitiveProcessor and GrGLProgramBuilder does not allow for // a system where GrGLPathProcessor would be able to refer to a primitive-specific builder // that would understand separable varyings. Thus separable varyings need to be present // early in the inheritance chain of builders. SkASSERT(false); return SeparableVaryingHandle(); }
GrGLProgramBuilder::SeparableVaryingHandle GrGLProgramBuilder::addSeparableVarying( const char* name, GrGLSLVertToFrag* v, GrSLPrecision fsPrecision) { // This call is not used for non-NVPR backends. SkASSERT(fGpu->glCaps().shaderCaps()->pathRenderingSupport() && fArgs.fPrimitiveProcessor->isPathRendering() && !fArgs.fPrimitiveProcessor->willUseGeoShader() && fArgs.fPrimitiveProcessor->numAttribs() == 0); this->addVarying(name, v, fsPrecision); SeparableVaryingInfo& varyingInfo = fSeparableVaryingInfos.push_back(); varyingInfo.fVariable = this->getFragmentShaderBuilder()->fInputs.back(); varyingInfo.fLocation = fSeparableVaryingInfos.count() - 1; return SeparableVaryingHandle(varyingInfo.fLocation); }