57
58
60 static constexpr size_t kMaxSamplesPerFrame = 64;
61 fMotionBlurSamples =
std::min(ParseDefault<size_t>((*jmb)[
"spf"], 1ul),
62 kMaxSamplesPerFrame);
65 }
66
67 int camera_builder_index = -1;
68
69
71 fLayerBuilders.reserve(
SkToInt(jlayers->size()));
73 if (!jlayer) continue;
74
75 const auto lbuilder_index = fLayerBuilders.size();
76 fLayerBuilders.emplace_back(*jlayer, fSize);
77 const auto& lbuilder = fLayerBuilders.back();
78
79 fLayerIndexMap.
set(lbuilder.index(), lbuilder_index);
80
81
82 if (lbuilder.isCamera()) {
83
84 if (camera_builder_index < 0) {
85 camera_builder_index =
SkToInt(lbuilder_index);
86 } else {
88 "Ignoring duplicate camera layer.");
89 }
90 }
91 }
92 }
93
94
95
96 if (camera_builder_index >= 0) {
97
98 fCameraTransform = fLayerBuilders[camera_builder_index].buildTransform(abuilder, this);
99 }
else if (ParseDefault<int>(jcomp[
"ddd"], 0) && !fSize.
isEmpty()) {
100
102 }
103}
static constexpr const T & SkTPin(const T &x, const T &lo, const T &hi)
constexpr int SkToInt(S x)
static sk_sp< sksg::Transform > DefaultCameraTransform(const SkSize &viewport_size)
static float min(float r, float g, float b)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
T ParseDefault(const skjson::Value &v, const T &defaultValue)