* Patch to build with Qt 5.11 and later by jriwanek * Attempt to fix viewport on hardware renderers
29 lines
516 B
C++
29 lines
516 B
C++
#pragma once
|
|
|
|
#include <QRect>
|
|
#include <QImage>
|
|
#include <QEvent>
|
|
|
|
#include <vector>
|
|
#include <tuple>
|
|
#include <atomic>
|
|
#include <memory>
|
|
|
|
class QWidget;
|
|
|
|
class RendererCommon
|
|
{
|
|
public:
|
|
RendererCommon();
|
|
|
|
void onResize(int width, int height);
|
|
virtual std::vector<std::tuple<uint8_t*, std::atomic_flag*>> getBuffers() = 0;
|
|
protected:
|
|
bool eventDelegate(QEvent* event, bool& result);
|
|
|
|
QRect source, destination;
|
|
QWidget* parentWidget{nullptr};
|
|
|
|
std::vector<std::atomic_flag> buf_usage;
|
|
};
|