/* * Copyright 2019 Google LLC * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file.
*/ #include"src/core/SkRuntimeBlender.h"
bool SkRuntimeBlender::onAppendStages(const SkStageRec& rec) const { if (!SkRuntimeEffectPriv::CanDraw(SkCapabilities::RasterBackend().get(), fEffect.get())) { // SkRP has support for many parts of #version 300 already, but for now, we restrict its // usage in runtime effects to just #version 100. returnfalse;
} if (const SkSL::RP::Program* program = fEffect->getRPProgram(/*debugTrace=*/nullptr)) {
SkSpan<constfloat> uniforms = SkRuntimeEffectPriv::UniformsAsSpan(
fEffect->uniforms(),
fUniforms, /*alwaysCopyIntoAlloc=*/false,
rec.fDstCS,
rec.fAlloc);
SkShaders::MatrixRec matrix(SkMatrix::I());
matrix.markCTMApplied();
RuntimeEffectRPCallbacks callbacks(rec, matrix, fChildren, fEffect->fSampleUsages); bool success = program->appendStages(rec.fPipeline, rec.fAlloc, &callbacks, uniforms); return success;
} returnfalse;
}
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.