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