MCPcopy Create free account
hub / github.com/Tencent/tgfx / StartDrawLoop

Function StartDrawLoop

ohos/hello2d/src/main/cpp/napi_init.cpp:93–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93static napi_value StartDrawLoop(napi_env, napi_callback_info) {
94 if (displayLink == nullptr) {
95 displayLink = std::make_shared<DisplayLink>([&]() {
96 Draw(static_cast<int>(drawIndex), static_cast<float>(zoomScale),
97 static_cast<float>(contentOffsetX), static_cast<float>(contentOffsetY));
98 });
99 }
100 displayLink->start();
101 return nullptr;
102}
103
104static napi_value StopDrawLoop(napi_env, napi_callback_info) {
105 if (displayLink != nullptr) {

Callers

nothing calls this directly

Calls 2

startMethod · 0.80
DrawFunction · 0.70

Tested by

no test coverage detected