mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Using std future promises to get thumbnail of render view
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
#ifndef RENDERVIEW_H
|
||||
#define RENDERVIEW_H
|
||||
|
||||
#include <mutex>
|
||||
#include <future>
|
||||
|
||||
#include "View.h"
|
||||
|
||||
class RenderView : public View
|
||||
@@ -8,6 +11,9 @@ class RenderView : public View
|
||||
FrameBuffer *frame_buffer_;
|
||||
Surface *fading_overlay_;
|
||||
|
||||
std::promise<FrameBufferImage *> thumbnail_;
|
||||
std::future<FrameBufferImage *> thumbnailer_;
|
||||
|
||||
public:
|
||||
RenderView ();
|
||||
~RenderView ();
|
||||
@@ -23,7 +29,7 @@ public:
|
||||
|
||||
inline FrameBuffer *frame () const { return frame_buffer_; }
|
||||
|
||||
FrameBufferImage *thumbnail () const;
|
||||
FrameBufferImage *thumbnail ();
|
||||
};
|
||||
|
||||
#endif // RENDERVIEW_H
|
||||
|
||||
Reference in New Issue
Block a user