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

Function PAG_TEST

test/src/AsyncDecodeTest.cpp:27–39  ·  view source on GitHub ↗

* 用例描述: 异步解码时候同步删除图层 */

Source from the content-addressed store, hash-verified

25 * 用例描述: 异步解码时候同步删除图层
26 */
27PAG_TEST(AsyncDecode, remove_ID79139135) {
28 PAG_SETUP_WITH_PATH(TestPAGSurface, TestPAGPlayer, TestPAGFile,
29 "resources/apitest/AsyncDecodeTest.pag");
30 // 触发第一个视频图层初始化
31 TestPAGPlayer->flush();
32 // 移除所有图层
33 TestPAGPlayer->getComposition()->removeAllLayers();
34 // 需要再次flush,因为缓存是在flush时候才会删除
35 TestPAGPlayer->flush();
36
37 // 图像销毁时候,异步正在初始化的序列帧也应该被销毁
38 EXPECT_EQ(static_cast<int>(TestPAGPlayer->renderCache->sequenceCaches.size()), 0);
39}
40
41/**
42 * 用例描述: 校验异步预测是否能正常命中和回收

Callers

nothing calls this directly

Calls 12

LoadPAGFileFunction · 0.85
MakePAGImageFunction · 0.85
sizeMethod · 0.80
flushMethod · 0.45
removeAllLayersMethod · 0.45
getCompositionMethod · 0.45
nextFrameMethod · 0.45
setProgressMethod · 0.45
setCompositionMethod · 0.45
replaceImageMethod · 0.45
uniqueIDMethod · 0.45

Tested by

no test coverage detected