static inline void GenKey(const GrGeometryProcessor& gp, const GrBatchTracker& bt, const GrGLSLCaps&, GrProcessorKeyBuilder* b) { const BatchTracker& local = bt.cast<BatchTracker>(); uint32_t key = local.fInputColorType << 16; key |= local.fUsesLocalCoords && gp.localMatrix().hasPerspective() ? 0x1 : 0x0; key |= ComputePosKey(gp.viewMatrix()) << 1; b->add32(key); }
static inline void GenKey(const GrGeometryProcessor& gp, const GrBatchTracker& bt, const GrGLCaps&, GrProcessorKeyBuilder* b) { const GrDistanceFieldTextureEffect& dfTexEffect = gp.cast<GrDistanceFieldTextureEffect>(); const DistanceFieldBatchTracker& local = bt.cast<DistanceFieldBatchTracker>(); uint32_t key = dfTexEffect.getFlags(); key |= local.fInputColorType << 16; key |= local.fUsesLocalCoords && gp.localMatrix().hasPerspective() ? 0x1 << 24: 0x0; key |= ComputePosKey(gp.viewMatrix()) << 25; b->add32(key); }
static inline void GenKey(const GrGeometryProcessor& gp, const GrBatchTracker& bt, const GrGLCaps&, GrProcessorKeyBuilder* b) { const DefaultGeoProc& def = gp.cast<DefaultGeoProc>(); const BatchTracker& local = bt.cast<BatchTracker>(); uint32_t key = def.fFlags; key |= local.fInputColorType << 8 | local.fInputCoverageType << 16; key |= local.fUsesLocalCoords && gp.localMatrix().hasPerspective() ? 0x1 << 24 : 0x0; key |= ComputePosKey(gp.viewMatrix()) << 25; b->add32(key); }