Lines Matching refs:rec
79 SkShaderBase::Context* SkShaderBase::makeContext(const ContextRec& rec, SkArenaAlloc* alloc) const {
82 if (rec.fMatrix->hasPerspective() ||
84 (rec.fLocalMatrix && rec.fLocalMatrix->hasPerspective()) ||
85 !this->computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, nullptr)) {
89 return this->onMakeContext(rec, alloc);
95 SkShaderBase::Context::Context(const SkShaderBase& shader, const ContextRec& rec)
96 : fShader(shader), fCTM(*rec.fMatrix)
99 SkASSERT(!rec.fMatrix->hasPerspective());
100 SkASSERT(!rec.fLocalMatrix || !rec.fLocalMatrix->hasPerspective());
105 SkAssertResult(fShader.computeTotalInverse(*rec.fMatrix, rec.fLocalMatrix, &fTotalInverse));
107 fPaintAlpha = rec.fPaintAlpha;
164 bool SkShaderBase::appendStages(const SkStageRec& rec) const {
165 return this->onAppendStages(rec);
168 bool SkShaderBase::onAppendStages(const SkStageRec& rec) const {
172 SkTCopyOnFirstWrite<SkPaint> opaquePaint(rec.fPaint);
173 if (rec.fPaint.getAlpha() != SK_AlphaOPAQUE) {
177 ContextRec cr(*opaquePaint, rec.fMatrixProvider.localToDevice(), rec.fLocalM, rec.fDstColorType,
184 auto cb = rec.fAlloc->make<CallbackCtx>();
186 cb->ctx = as_SB(this)->makeContext(cr, rec.fAlloc);
201 rec.fPipeline->append(SkRasterPipeline::seed_shader);
202 rec.fPipeline->append(SkRasterPipeline::callback, cb);
203 rec.fAlloc->make<SkColorSpaceXformSteps>(sk_srgb_singleton(), kPremul_SkAlphaType,
204 rec.fDstCS, kPremul_SkAlphaType)
205 ->apply(rec.fPipeline);