MCPcopy Create free account
hub / github.com/Tencent/libpag / updateStaticTimeRanges

Method updateStaticTimeRanges

src/base/VectorComposition.cpp:34–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34void VectorComposition::updateStaticTimeRanges() {
35 staticTimeRanges = {};
36 if (duration <= 1) {
37 return;
38 }
39 TimeRange range = {0, duration - 1};
40 staticTimeRanges.push_back(range);
41 for (auto layer : layers) {
42 if (staticTimeRanges.empty()) {
43 break;
44 }
45 if (layer->type() == LayerType::PreCompose) {
46 auto composition = static_cast<PreComposeLayer*>(layer)->composition;
47 if (!composition->staticTimeRangeUpdated) {
48 composition->updateStaticTimeRanges();
49 composition->staticTimeRangeUpdated = true;
50 }
51 }
52 layer->excludeVaryingRanges(&staticTimeRanges);
53 SplitTimeRangesAt(&staticTimeRanges, layer->startTime);
54 SplitTimeRangesAt(&staticTimeRanges, layer->startTime + layer->duration);
55 }
56}
57
58bool VectorComposition::hasImageContent() const {
59 for (auto& layer : layers) {

Callers

nothing calls this directly

Calls 5

SplitTimeRangesAtFunction · 0.85
push_backMethod · 0.80
emptyMethod · 0.80
typeMethod · 0.45
excludeVaryingRangesMethod · 0.45

Tested by

no test coverage detected