/* * Copyright 2023 The Android Open Source Project * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file.
*/
bool SkCoordClampShader::appendStages(const SkStageRec& rec, const SkShaders::MatrixRec& mRec) const {
std::optional<SkShaders::MatrixRec> childMRec = mRec.apply(rec); if (!childMRec.has_value()) { returnfalse;
} // Strictly speaking, childMRec's total matrix is not valid. It is only valid inside the subset // rectangle. However, we don't mark it as such because we want the "total matrix is valid" // behavior in SkImageShader for filtering. auto clampCtx = rec.fAlloc->make<SkRasterPipeline_CoordClampCtx>();
*clampCtx = {fSubset.fLeft, fSubset.fTop, fSubset.fRight, fSubset.fBottom};
rec.fPipeline->append(SkRasterPipelineOp::clamp_x_and_y, clampCtx); return as_SB(fShader)->appendStages(rec, *childMRec);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.