8#ifndef GrGLSLColorSpaceXformHelper_DEFINED
9#define GrGLSLColorSpaceXformHelper_DEFINED
29 if (colorSpaceXform) {
30 fFlags = colorSpaceXform->fSteps.
flags;
33 "SrcTF", kNumTransferFnCoeffs);
42 "DstTF", kNumTransferFnCoeffs);
50 pdman.
set1fv(fSrcTFVar, kNumTransferFnCoeffs, &colorSpaceXform->fSteps.
srcTF.
g);
56 pdman.
set1fv(fDstTFVar, kNumTransferFnCoeffs, &colorSpaceXform->fSteps.
dstTFInv.
g);
71 GrGLSLProgramDataManager::UniformHandle
srcTFUniform()
const {
return fSrcTFVar; }
72 GrGLSLProgramDataManager::UniformHandle
gamutXformUniform()
const {
return fGamutXformVar; }
73 GrGLSLProgramDataManager::UniformHandle
dstTFUniform()
const {
return fDstTFVar; }
76 static const int kNumTransferFnCoeffs = 7;
78 GrGLSLProgramDataManager::UniformHandle fSrcTFVar;
79 GrGLSLProgramDataManager::UniformHandle fGamutXformVar;
80 GrGLSLProgramDataManager::UniformHandle fDstTFVar;
virtual void setMatrix3f(UniformHandle, const float matrix[]) const =0
virtual void set1fv(UniformHandle, int arrayCount, const float v[]) const =0
skcms_TFType skcms_TransferFunction_getType(const skcms_TransferFunction *tf)