// The default tracer does not yet support splitting up trace output into sections. void newTracingSection(constchar* name) override {}
};
// We prefer gUserTracer if it's been set, otherwise we fall back on a default tracer; static std::atomic<SkEventTracer*> gUserTracer{nullptr};
bool SkEventTracer::SetInstance(SkEventTracer* tracer) {
SkEventTracer* expected = nullptr; if (!gUserTracer.compare_exchange_strong(expected, tracer)) { delete tracer; returnfalse;
} // Once set, `tracer` remains alive until the process is destroyed.
SK_INTENTIONALLY_LEAKED(tracer);
// GetInstance() will return `tracer` here, but allows us to avoid capturing anything in the // lambda. Even if it returned the SkDefaultEventTracer, calling onExit() on that is safe. // SkDefaultEventTracer::onExit() is a no-op, which is why we don't unconditionally add the // atexit() callback; it's only of interest if a custom tracer is installed.
atexit([]() { GetInstance()->onExit(); });
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.