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

Function PAG_TEST

test/src/PAGSequenceTest.cpp:30–42  ·  view source on GitHub ↗

* 用例描述: 测试直接上屏 */

Source from the content-addressed store, hash-verified

28 * 用例描述: 测试直接上屏
29 */
30PAG_TEST(PAGSequenceTest, RenderOnScreen) {
31 auto pagFile = LoadPAGFile("resources/apitest/wz_mvp.pag");
32 EXPECT_NE(pagFile, nullptr);
33 auto pagSurface = OffscreenSurface::Make(750, 1334);
34 auto pagPlayer = std::make_shared<PAGPlayer>();
35 pagPlayer->setSurface(pagSurface);
36 pagPlayer->setComposition(pagFile);
37 pagPlayer->setMatrix(Matrix::I());
38 pagPlayer->setProgress(0.5);
39 pagPlayer->flush();
40 EXPECT_EQ(static_cast<int>(pagPlayer->renderCache->sequenceCaches.size()), 1);
41 EXPECT_TRUE(Baseline::Compare(pagSurface, "PAGSequenceTest/pagSequenceTest"));
42}
43
44/**
45 * 用例描述: bitmapSequence关键帧不是全屏的时候要清屏

Callers

nothing calls this directly

Calls 15

LoadPAGFileFunction · 0.85
sizeMethod · 0.80
emptyMethod · 0.80
MakeFunction · 0.50
setSurfaceMethod · 0.45
setCompositionMethod · 0.45
setMatrixMethod · 0.45
setProgressMethod · 0.45
flushMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45
layerTypeMethod · 0.45

Tested by

no test coverage detected