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 [[nodiscard]] virtual std::span<Pixel> acquireLine(unsigned y) = 0;
18 virtual void releaseLine(unsigned y, std::span<Pixel> buf) = 0;
19 virtual void fillLine (unsigned y, Pixel color) = 0;
20 // TODO add copyLine() optimization
21
22protected:
23 ScalerOutput() = default;
24};
25
26} // namespace openmsx
27
28#endif
virtual unsigned getWidth() const =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