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

Function PAG_TEST

test/src/MultiThreadCase.cpp:44–53  ·  view source on GitHub ↗

* 用例描述: 使用多个PAGPlayer模拟多个PAGView同时渲染 */

Source from the content-addressed store, hash-verified

42 * 用例描述: 使用多个PAGPlayer模拟多个PAGView同时渲染
43 */
44PAG_TEST(SimpleMultiThreadCase, MultiPAGView) {
45 std::vector<std::thread> threads;
46 int num = 10;
47 for (int i = 0; i < num; i++) {
48 threads.emplace_back(std::thread(mockPAGView));
49 }
50 for (auto& mock : threads) {
51 if (mock.joinable()) mock.join();
52 }
53}
54
55static std::shared_ptr<PAGSurface> TestPAGSurface = nullptr;
56static std::shared_ptr<PAGPlayer> TestPAGPlayer = nullptr;

Callers

nothing calls this directly

Calls 11

SetupPAGFunction · 0.85
TearDownPAGFunction · 0.85
joinMethod · 0.80
getLayerAtMethod · 0.45
swapLayerAtMethod · 0.45
flushMethod · 0.45
removeLayerAtMethod · 0.45
addLayerAtMethod · 0.45
freeCacheMethod · 0.45
hitTestPointMethod · 0.45
getLayersUnderPointMethod · 0.45

Tested by

no test coverage detected