MCPcopy Create free account
hub / github.com/cocos/cocos-engine / endRenderFrame

Method endRenderFrame

native/cocos/platform/java/modules/XRInterface.cpp:925–953  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

923}
924
925bool XRInterface::endRenderFrame() {
926#if CC_USE_XR
927 if (IS_ENABLE_XR_LOG) {
928 CC_LOG_INFO("[XR] endRenderFrame.%d",
929 cc::ApplicationManager::getInstance()->getCurrentAppSafe()->getEngine()->getTotalFrames());
930 }
931
932 if (gfx::DeviceAgent::getInstance()) {
933 ENQUEUE_MESSAGE_0(gfx::DeviceAgent::getInstance()->getMessageQueue(),
934 EndRenderFrame,
935 {
936 xr::XrEntry::getInstance()->frameEnd();
937 gfx::DeviceAgent::getInstance()->presentSignal();
938 if (IS_ENABLE_XR_LOG) CC_LOG_INFO("[XR] [RT] presentSignal endRenderFrame.%d",
939 cc::ApplicationManager::getInstance()->getCurrentAppSafe()->getEngine()->getTotalFrames());
940 })
941 _committedFrame = true;
942 // CC_LOG_INFO("[XR] endRenderFrame pass presentWait errno %d", errno);
943 } else {
944 xr::XrEntry::getInstance()->frameEnd();
945 #if CC_USE_XR_REMOTE_PREVIEW
946 if (_xrRemotePreviewManager) {
947 _xrRemotePreviewManager->tick();
948 }
949 #endif
950 }
951#endif
952 return true;
953}
954
955bool XRInterface::platformLoopEnd() {
956#if CC_USE_XR

Callers 1

tickMethod · 0.80

Calls 5

getEngineMethod · 0.80
getCurrentAppSafeMethod · 0.80
presentSignalMethod · 0.80
getTotalFramesMethod · 0.45
tickMethod · 0.45

Tested by

no test coverage detected