openMSX
LDSDLRasterizer.cc
Go to the documentation of this file.
1#include "LDSDLRasterizer.hh"
2#include "RawFrame.hh"
3#include "PostProcessor.hh"
4#include "PixelOperations.hh"
5#include <cstdint>
6
7namespace openmsx {
8
10 std::unique_ptr<PostProcessor> postProcessor_)
11 : postProcessor(std::move(postProcessor_))
12 , workFrame(std::make_unique<RawFrame>(640, 480))
13{
14}
15
17
19{
20 return postProcessor.get();
21}
22
23void LDSDLRasterizer::frameStart(EmuTime::param time)
24{
25 workFrame = postProcessor->rotateFrames(std::move(workFrame), time);
26}
27
28void LDSDLRasterizer::drawBlank(int r, int g, int b)
29{
30 // We should really be presenting the "LASERVISION" text
31 // here, like the real laserdisc player does. Note that this
32 // changes when seeking or starting to play.
33 PixelOperations pixelOps;
34 auto background = pixelOps.combine(r, g, b);
35 for (auto y : xrange(480)) {
36 workFrame->setBlank(y, background);
37 }
38}
39
41{
42 return workFrame.get();
43}
44
45} // namespace openmsx
int g
void drawBlank(int r, int g, int b) override
LDSDLRasterizer(std::unique_ptr< PostProcessor > postProcessor)
PostProcessor * getPostProcessor() const override
RawFrame * getRawFrame() override
void frameStart(EmuTime::param time) override
Pixel combine(unsigned r, unsigned g, unsigned b) const
Combine RGB components to a pixel.
A post processor builds the frame that is displayed from the MSX frame, while applying effects such a...
A video frame as output by the VDP scanline conversion unit, before any postprocessing filters are ap...
Definition RawFrame.hh:16
This file implemented 3 utility functions:
Definition Autofire.cc:11
STL namespace.
constexpr auto xrange(T e)
Definition xrange.hh:132