#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
!defined(SK_CPU_LOONGARCH) && !defined(SK_CPU_PPC) && !defined(__sparc) && \
!(defined(_WIN32) && defined(SK_BUILD_FOR_ANDROID_FRAMEWORK)) && \
!(defined(_WIN32) && defined(__GNUC__)) // [[clang::musttail]] is disabled for the Android version of Skia running on Windows as it // causes crashes (This is probably related to http://crbug.com/1505442). // Also, MinGW causes stack alignment problems with musttail that can cause crashes. #define SK_HAS_MUSTTAIL 1 #else #define SK_HAS_MUSTTAIL 0 #endif
// Raster pipeline programs are stored as a contiguous array of SkRasterPipelineStages.
SK_BEGIN_REQUIRE_DENSE struct SkRasterPipelineStage { // `fn` holds a function pointer from `ops_lowp` or `ops_highp` in SkOpts.cpp. These functions // correspond to operations from the SkRasterPipelineOp enum in SkRasterPipelineOpList.h. The // exact function pointer type varies depending on architecture (specifically, look for `using // Stage =` in SkRasterPipeline_opts.h). void (*fn)();
// `ctx` holds data used by the stage function. // Most context structures are declared in SkRasterPipelineOpContexts.h, and have names ending // in Ctx (e.g. "SkRasterPipelineContexts::SamplerCtx"). Some Raster Pipeline stages pack // non-pointer data into this field using `SkRPCtxUtils::Pack`. void* ctx;
};
SK_END_REQUIRE_DENSE
class SkRasterPipeline {
public: explicit SkRasterPipeline(SkArenaAlloc*);
// Prints the entire StageList using SkDebugf. void dump() const;
// Appends a stage for the specified matrix. // Tries to optimize the stage by analyzing the type of matrix. void appendMatrix(SkArenaAlloc*, const SkMatrix&);
// Appends a stage for a constant uniform color. // Tries to optimize the stage based on the color. void appendConstantColor(SkArenaAlloc*, constfloat rgba[4]);
void uncheckedAppend(SkRasterPipelineOp, void*); int stagesNeeded() const;
void addMemoryContext(SkRasterPipelineContexts::MemoryCtx*, int bytesPerPixel, bool load, bool store);
uint8_t* tailPointer();
SkArenaAlloc* fAlloc;
SkRasterPipelineContexts::RewindCtx* fRewindCtx; // A linked list of stages. fStages and getStageList() return the latest stage.
StageList* fStages;
uint8_t* fTailPointer; int fNumStages;
// Only 1 in 2 million CPU-backend pipelines used more than two MemoryCtxs. // (See the comment in SkRasterPipelineOpContexts.h for how MemoryCtx patching works)
skia_private::STArray<2, SkRasterPipelineContexts::MemoryCtxInfo> fMemoryCtxInfos;
};
template <size_t bytes> class SkRasterPipeline_ : public SkRasterPipeline {
public:
SkRasterPipeline_()
: SkRasterPipeline(&fBuiltinAlloc) {}
private:
SkSTArenaAlloc<bytes> fBuiltinAlloc;
};
#endif//SkRasterPipeline_DEFINED
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.2 Sekunden
(vorverarbeitet am 2026-08-26)
¤
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.