openMSX
ScalerOutput.hh
Go to the documentation of this file.
1#ifndef SCALEROUTPUT_HH
2#define SCALEROUTPUT_HH
3
4#include <concepts>
5#include <span>
6
7namespace openmsx {
8
9template<std::unsigned_integral Pixel> class ScalerOutput
10{
11public:
12 virtual ~ScalerOutput() = default;
13
14 [[nodiscard]] virtual unsigned getWidth() const = 0;
15 [[nodiscard]] virtual unsigned getHeight() const = 0;
16
17 virtual void frameStart() = 0;
18 virtual void frameStop() = 0;
19
20 [[nodiscard]] virtual std::span<Pixel> acquireLine(unsigned y) = 0;
21 virtual void releaseLine(unsigned y, std::span<Pixel> buf) = 0;
22 virtual void fillLine (unsigned y, Pixel color) = 0;
23 // TODO add copyLine() optimization
24
25protected:
26 ScalerOutput() = default;
27};
28
29} // namespace openmsx
30
31#endif
virtual unsigned getWidth() const =0
virtual void frameStop()=0
virtual void frameStart()=0
virtual unsigned getHeight() const =0
virtual void fillLine(unsigned y, Pixel color)=0
virtual void releaseLine(unsigned y, std::span< Pixel > buf)=0
virtual ~ScalerOutput()=default
virtual std::span< Pixel > acquireLine(unsigned y)=0
This file implemented 3 utility functions:
Definition: Autofire.cc:9
uint32_t Pixel