OXYGENHUB
◆ main openmsx / src / video / DoubledFrame.hh
713 B · C++ · last changed chore(): initial commit 1 month ago source blame history raw
1
#ifndef DOUBLEDFRAME_HH
2
#define DOUBLEDFRAME_HH
3
4
#include "FrameSource.hh"
5
6
namespace openmsx {
7
8
/** Produces a video frame that has every line from the input frame twice
9
  * plus a possibly repeated line at the top.
10
  * This class does not copy the data from the input FrameSource.
11
  */
12
class DoubledFrame final : public FrameSource
13
{
14
public:
15
	void init(FrameSource* field, int skip);
16
17
private:
18
	[[nodiscard]] unsigned getLineWidth(unsigned line) const override;
19
	[[nodiscard]] std::span<const Pixel> getUnscaledLine(
20
		unsigned line, std::span<Pixel> helpBuf) const override;
21
22
private:
23
	/** The original frame whose data will be doubled.
24
	  */
25
	FrameSource* field;
26
	int skip;
27
};
28
29
} // namespace openmsx
30
31
#endif