aboutsummaryrefslogtreecommitdiff
path: root/cube/cube.cpp
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2025-04-08 15:56:08 -0500
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2025-04-11 15:13:14 -0600
commit5394fd5dd5edbd3d14e263b7883a40c2193ee296 (patch)
treed21881e1a9a77c97721d9a4224575abc049a1ad2 /cube/cube.cpp
parent555dca10345cc87918876ff8c55805e54014b6ac (diff)
downloadusermoji-5394fd5dd5edbd3d14e263b7883a40c2193ee296.tar.xz
cube: Only count non-minimized frames
Diffstat (limited to 'cube/cube.cpp')
-rw-r--r--cube/cube.cpp32
1 files changed, 24 insertions, 8 deletions
diff --git a/cube/cube.cpp b/cube/cube.cpp
index 1d462b0e..24f7b3f0 100644
--- a/cube/cube.cpp
+++ b/cube/cube.cpp
@@ -3081,7 +3081,9 @@ void Demo::run<WsiPlatform::win32>() {
}
draw();
- curFrame++;
+ if (!is_minimized) {
+ curFrame++;
+ }
if (frameCount != UINT32_MAX && curFrame == frameCount) {
PostQuitMessage(validation_error);
@@ -3231,7 +3233,9 @@ void Demo::run<WsiPlatform::xlib>() {
}
draw();
- curFrame++;
+ if (!is_minimized) {
+ curFrame++;
+ }
if (frameCount != UINT32_MAX && curFrame == frameCount) {
quit = true;
@@ -3302,7 +3306,9 @@ void Demo::run<WsiPlatform::xcb>() {
}
draw();
- curFrame++;
+ if (!is_minimized) {
+ curFrame++;
+ }
if (frameCount != UINT32_MAX && curFrame == frameCount) {
quit = true;
}
@@ -3352,7 +3358,9 @@ void Demo::run<WsiPlatform::wayland>() {
} else {
wl_display_dispatch_pending(wayland_display);
draw();
- curFrame++;
+ if (!is_minimized) {
+ curFrame++;
+ }
if (frameCount != UINT32_MAX && curFrame == frameCount) {
quit = true;
}
@@ -3465,7 +3473,9 @@ void Demo::run<WsiPlatform::directfb>() {
if (!event_buffer->GetEvent(event_buffer, DFB_EVENT(&event))) handle_directfb_event(&event);
draw();
- curFrame++;
+ if (!is_minimized) {
+ curFrame++;
+ }
if (frameCount != UINT32_MAX && curFrame == frameCount) {
quit = true;
}
@@ -3515,7 +3525,9 @@ void Demo::create_window<WsiPlatform::directfb>() {
template <>
void Demo::run<WsiPlatform::metal>() {
draw();
- curFrame++;
+ if (!is_minimized) {
+ curFrame++;
+ }
if (frameCount != UINT32_MAX && curFrame == frameCount) {
quit = true;
}
@@ -3730,7 +3742,9 @@ void Demo::run<WsiPlatform::qnx>() {
} else {
update_data_buffer();
draw();
- curFrame++;
+ if (!is_minimized) {
+ curFrame++;
+ }
if (frameCount != UINT32_MAX && curFrame == frameCount) {
quit = true;
}
@@ -3900,7 +3914,9 @@ void Demo::run<WsiPlatform::fuchsia_display>() {
draw();
- curFrame++;
+ if (!is_minimized) {
+ curFrame++;
+ }
elapsed_frames++;
if (frameCount != UINT32_MAX && curFrame == frameCount) {