From ce94cd2d1e75738b53f7ab990a49e75a01b80394 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Wed, 11 Aug 2021 09:20:00 -0500 Subject: preload next frame before ticking over --- include/aolayer.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/aolayer.h b/include/aolayer.h index 7a8e2fd9..4b95ddbd 100644 --- a/include/aolayer.h +++ b/include/aolayer.h @@ -7,6 +7,7 @@ #include #include #include +#include class AOApplication; class VPath; @@ -139,6 +140,9 @@ protected: // Center the QLabel in the viewport based on the dimensions of f_pixmap void center_pixmap(QPixmap f_pixmap); + // Populate the frame and delay vectors. Done asynchronously. + void load_next_frame(); + signals: void done(); -- cgit From 42760bc3f86e1d38acbf6c3c9f675dbf6acc37c8 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Wed, 11 Aug 2021 09:40:11 -0500 Subject: more accurate comment --- include/aolayer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/aolayer.h b/include/aolayer.h index 4b95ddbd..1216b324 100644 --- a/include/aolayer.h +++ b/include/aolayer.h @@ -140,7 +140,7 @@ protected: // Center the QLabel in the viewport based on the dimensions of f_pixmap void center_pixmap(QPixmap f_pixmap); - // Populate the frame and delay vectors. Done asynchronously. + // Populates the frame and delay vectors with the next frame's data. void load_next_frame(); signals: -- cgit From 2a18c1cdec54a324c6ba9834d6e6b05cc46f2535 Mon Sep 17 00:00:00 2001 From: in1tiate Date: Wed, 11 Aug 2021 20:14:35 -0500 Subject: wait for thread to finish before starting new one --- include/aolayer.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/aolayer.h b/include/aolayer.h index 1216b324..ffbd6dac 100644 --- a/include/aolayer.h +++ b/include/aolayer.h @@ -143,6 +143,9 @@ protected: // Populates the frame and delay vectors with the next frame's data. void load_next_frame(); + // used in load_next_frame + QFuture future; + signals: void done(); -- cgit