-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPush2DisplayRenderer.h
33 lines (28 loc) · 987 Bytes
/
Push2DisplayRenderer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef PUSH2_DISPLAY_RENDERER_H
#define PUSH2_DISPLAY_RENDERER_H
#include "FpFrameBuffer.h"
#include "Push2UsbDisplay.h"
#include "FpRenderBase.h"
#include "FpGfxTypes.h"
#include <cstdint>
namespace push2device
{
class DisplayRenderer : public fp::RenderBase
{
public:
DisplayRenderer();
~DisplayRenderer(); // needed so it can be used as a std::unique_ptr
void drawPixel(const gfx::Coord& coord, const ColorRGB& color) override;
void streamToSubWindow(const gfx::Rectangle& subWindow,
const ColorRGB* pPixelStream) override;
void streamFromFramebuf(const gfx::Rectangle& subWindow,
const gfx::Resolution& resolution,
const ColorRGB* pFrameBuf) override;
fp::gfx::Resolution getResolution() const override;
void flushFrameBuffer();
private:
FrameBuffer<uint16_t> m_frameBuf;
UsbDisplay m_usbDisplay;
};
} // namespace push2device
#endif