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

Method preparePreComposeLayer

src/rendering/caches/RenderCache.cpp:82–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void RenderCache::preparePreComposeLayer(PreComposeLayer* layer) {
83 auto composition = layer->composition;
84 if (composition->type() != CompositionType::Video &&
85 composition->type() != CompositionType::Bitmap) {
86 return;
87 }
88 usedAssets.insert(composition->uniqueID);
89 auto sequence = Sequence::Get(composition);
90 auto info = SequenceInfo::Make(sequence);
91 if (composition->staticContent()) {
92 SequenceImageProxy proxy(info, 0);
93 prepareAssetImage(composition->uniqueID, &proxy);
94 return;
95 }
96 auto result = sequenceCaches.find(composition->uniqueID);
97 if (result != sequenceCaches.end()) {
98 return;
99 }
100 auto queue = makeSequenceImageQueue(info);
101 if (queue) {
102 queue->prepareNextImage();
103 }
104}
105
106void RenderCache::prepareImageLayer(PAGImageLayer* pagLayer) {
107 std::shared_ptr<Graphic> graphic = nullptr;

Callers

nothing calls this directly

Calls 6

insertMethod · 0.80
findMethod · 0.80
prepareNextImageMethod · 0.80
MakeFunction · 0.50
typeMethod · 0.45
staticContentMethod · 0.45

Tested by

no test coverage detected