qt: Add overload protection to renderers
Added atomic_flags for renderer buffers to prevent concurrent usage and overloading the renderer with draw requests when it's busy.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#define SOFTWARERENDERER_HPP
|
||||
|
||||
#include <QWidget>
|
||||
#include <atomic>
|
||||
#include "qt_renderercomon.hpp"
|
||||
|
||||
class SoftwareRenderer : public QWidget, public RendererCommon
|
||||
@@ -12,7 +13,7 @@ public:
|
||||
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
public slots:
|
||||
void onBlit(const QImage& img, int, int, int, int);
|
||||
void onBlit(const QImage& img, int, int, int, int, std::atomic_flag* in_use);
|
||||
|
||||
protected:
|
||||
void resizeEvent(QResizeEvent *event) override;
|
||||
|
||||
Reference in New Issue
Block a user