kodi
RPRendererGuiTexture.h
1 /*
2  * Copyright (C) 2017-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "RPBaseRenderer.h"
12 #include "cores/GameSettings.h"
13 #include "cores/RetroPlayer/buffers/BaseRenderBufferPool.h"
14 #include "cores/RetroPlayer/process/RPProcessInfo.h"
15 
16 namespace KODI
17 {
18 namespace RETRO
19 {
21 {
22 public:
23  ~CRendererFactoryGuiTexture() override = default;
24 
25  // implementation of IRendererFactory
26  std::string RenderSystemName() const override;
28  CRenderContext& context,
29  std::shared_ptr<IRenderBufferPool> bufferPool) override;
30  RenderBufferPoolVector CreateBufferPools(CRenderContext& context) override;
31 };
32 
34 {
35 public:
36  CRenderBufferPoolGuiTexture(SCALINGMETHOD scalingMethod);
37  ~CRenderBufferPoolGuiTexture() override = default;
38 
39  // implementation of IRenderBufferPool via CBaseRenderBufferPool
40  bool IsCompatible(const CRenderVideoSettings& renderSettings) const override;
41 
42  // implementation of CBaseRenderBufferPool
43  IRenderBuffer* CreateRenderBuffer(void* header = nullptr) override;
44 
45 private:
46  SCALINGMETHOD m_scalingMethod;
47 };
48 
50 {
51 public:
52  CRPRendererGuiTexture(const CRenderSettings& renderSettings,
53  CRenderContext& context,
54  std::shared_ptr<IRenderBufferPool> bufferPool);
55  ~CRPRendererGuiTexture() override = default;
56 
57  // public implementation of CRPBaseRenderer
58  bool Supports(RENDERFEATURE feature) const override;
59  SCALINGMETHOD GetDefaultScalingMethod() const override { return SCALINGMETHOD::NEAREST; }
60 
61 protected:
62  // protected implementation of CRPBaseRenderer
63  void RenderInternal(bool clear, uint8_t alpha) override;
64 };
65 } // namespace RETRO
66 } // namespace KODI
RenderBufferPoolVector CreateBufferPools(CRenderContext &context) override
Create buffer pools to manager buffers.
Definition: RPRendererGuiTexture.cpp:49
Definition: BaseRenderBufferPool.h:22
CRPBaseRenderer * CreateRenderer(const CRenderSettings &settings, CRenderContext &context, std::shared_ptr< IRenderBufferPool > bufferPool) override
Create a renderer.
Definition: RPRendererGuiTexture.cpp:41
Definition: IRenderBuffer.h:27
Definition: RPRendererGuiTexture.h:33
Definition: RPRendererGuiTexture.h:20
Definition: AudioDecoder.h:18
Rendering factory.
Definition: RPProcessInfo.h:46
Definition: RenderContext.h:43
Definition: settings.py:1
std::string RenderSystemName() const override
Get a description name of the rendering system.
Definition: RPRendererGuiTexture.cpp:36
Definition: RPRendererGuiTexture.h:49
Video settings provided by the rendering system.
Definition: RenderVideoSettings.h:22
Definition: RPBaseRenderer.h:32
Definition: RenderSettings.h:17