void GrGLNvprProgram::setTransformData(const GrPrimitiveProcessor& primProc, const GrPendingFragmentStage& proc, int index, GrGLInstalledFragProc* ip) { GrGLPathProcessor* pathProc = static_cast<GrGLPathProcessor*>(fGeometryProcessor.get()->fGLProc.get()); pathProc->setTransformData(primProc, index, proc.processor()->coordTransforms(), fGpu->glPathRendering(), fProgramID); }
void GrGLProgram::setTransformData(const GrPrimitiveProcessor& primProc, const GrPendingFragmentStage& processor, int index, GrGLInstalledFragProc* ip) { GrGLGeometryProcessor* gp = static_cast<GrGLGeometryProcessor*>(fGeometryProcessor.get()->fGLProc.get()); gp->setTransformData(primProc, fProgramDataManager, index, processor.processor()->coordTransforms()); }
void GrGLProgramBuilder::emitAndInstallProc(const GrPendingFragmentStage& fs, int index, const char* outColor, const char* inColor) { GrGLInstalledFragProc* ifp = SkNEW(GrGLInstalledFragProc); const GrFragmentProcessor& fp = *fs.processor(); ifp->fGLProc.reset(fp.createGLInstance()); SkSTArray<4, GrGLProcessor::TextureSampler> samplers(fp.numTextures()); this->emitSamplers(fp, &samplers, ifp); ifp->fGLProc->emitCode(this, fp, outColor, inColor, fOutCoords[index], samplers); // We have to check that effects and the code they emit are consistent, ie if an effect // asks for dst color, then the emit code needs to follow suit verify(fp); fFragmentProcessors->fProcs.push_back(ifp); }