openMSX
LDSDLRasterizer.hh
Go to the documentation of this file.
1 #ifndef LDSDLRASTERIZER_HH
2 #define LDSDLRASTERIZER_HH
3 
4 #include "LDRasterizer.hh"
5 #include "noncopyable.hh"
6 #include <SDL.h>
7 #include <memory>
8 
9 namespace openmsx {
10 
11 class VisibleSurface;
12 class RawFrame;
13 class PostProcessor;
14 
18 template <class Pixel>
19 class LDSDLRasterizer : public LDRasterizer, private noncopyable
20 {
21 public:
23  VisibleSurface& screen,
24  std::unique_ptr<PostProcessor> postProcessor);
25  virtual ~LDSDLRasterizer();
26 
27  // Rasterizer interface:
28  virtual PostProcessor* getPostProcessor() const;
29  virtual void frameStart(EmuTime::param time);
30  virtual void drawBlank(int r, int g, int b);
31  virtual RawFrame* getRawFrame();
32 
33 private:
37  const std::unique_ptr<PostProcessor> postProcessor;
38 
41  std::unique_ptr<RawFrame> workFrame;
42 
43  const SDL_PixelFormat pixelFormat;
44 };
45 
46 } // namespace openmsx
47 
48 #endif