mirror of
https://github.com/Ishan09811/pine.git
synced 2025-04-28 09:35:08 +00:00
test
This commit is contained in:
parent
184ee1ab26
commit
89cc678cf3
@ -112,6 +112,8 @@ namespace skyline::gpu {
|
||||
auto texture{frame.textureView->texture};
|
||||
if (frame.textureView->format != swapchainFormat || texture->dimensions != swapchainExtent)
|
||||
UpdateSwapchain(frame.textureView->format, texture->dimensions);
|
||||
|
||||
auto startTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
int result;
|
||||
if (frame.crop && frame.crop != windowCrop) {
|
||||
@ -157,6 +159,15 @@ namespace skyline::gpu {
|
||||
|
||||
frameFence = nextImageTexture->cycle;
|
||||
|
||||
auto endTime = std::chrono::high_resolution_clock::now();
|
||||
auto frameDuration = std::chrono::duration_cast<std::chrono::milliseconds>(endTime - startTime);
|
||||
const auto frameTimeThreshold = 16ms; // 16ms for 60 FPS
|
||||
|
||||
if (frameDuration > frameTimeThreshold) {
|
||||
LOGW("Frame skipped due to long processing time: {}ms", frameDuration.count());
|
||||
return; // Skip this frame
|
||||
}
|
||||
|
||||
auto getMonotonicNsNow{[]() -> i64 {
|
||||
timespec time;
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &time))
|
||||
|
Loading…
x
Reference in New Issue
Block a user