| 32 | } |
| 33 | |
| 34 | void 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 | |
| 58 | bool VectorComposition::hasImageContent() const { |
| 59 | for (auto& layer : layers) { |
nothing calls this directly
no test coverage detected