Merge pull request #8267 from lioncash/null

VideoBackends/Null: Minor cleanup
This commit is contained in:
Anthony 2019-07-27 15:06:26 -07:00 committed by GitHub
commit a9e04e0a72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 15 additions and 38 deletions

View File

@ -13,6 +13,7 @@
#include "VideoBackends/Null/VertexManager.h"
#include "VideoBackends/Null/VideoBackend.h"
#include "Common/Common.h"
#include "Common/MsgHandler.h"
#include "VideoCommon/FramebufferManager.h"
@ -97,4 +98,10 @@ void VideoBackend::Shutdown()
ShutdownShared();
}
std::string VideoBackend::GetDisplayName() const
{
// i18n: Null is referring to the null video backend, which renders nothing
return _trans("Null");
}
} // namespace Null

View File

@ -19,7 +19,6 @@ class NullTexture final : public AbstractTexture
{
public:
explicit NullTexture(const TextureConfig& config);
~NullTexture() = default;
void CopyRectangleFromTexture(const AbstractTexture* src,
const MathUtil::Rectangle<int>& src_rect, u32 src_layer,
@ -58,7 +57,6 @@ public:
explicit NullFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment,
AbstractTextureFormat color_format, AbstractTextureFormat depth_format,
u32 width, u32 height, u32 layers, u32 samples);
~NullFramebuffer() override = default;
static std::unique_ptr<NullFramebuffer> Create(NullTexture* color_attachment,
NullTexture* depth_attachment);

View File

@ -8,11 +8,9 @@
namespace Null
{
class PerfQuery : public PerfQueryBase
class PerfQuery final : public PerfQueryBase
{
public:
PerfQuery() {}
~PerfQuery() override {}
void EnableQuery(PerfQueryGroup type) override {}
void DisableQuery(PerfQueryGroup type) override {}
void ResetQuery() override {}

View File

@ -2,10 +2,9 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.
#include "Common/Logging/Log.h"
#include "VideoBackends/Null/Render.h"
#include "VideoBackends/Null/NullTexture.h"
#include "VideoBackends/Null/Render.h"
#include "VideoCommon/AbstractPipeline.h"
#include "VideoCommon/AbstractShader.h"
@ -45,7 +44,6 @@ class NullShader final : public AbstractShader
{
public:
explicit NullShader(ShaderStage stage) : AbstractShader(stage) {}
~NullShader() = default;
};
std::unique_ptr<AbstractShader>
@ -62,9 +60,6 @@ std::unique_ptr<AbstractShader> Renderer::CreateShaderFromBinary(ShaderStage sta
class NullPipeline final : public AbstractPipeline
{
public:
NullPipeline() = default;
~NullPipeline() override = default;
};
std::unique_ptr<AbstractPipeline> Renderer::CreatePipeline(const AbstractPipelineConfig& config,

View File

@ -8,7 +8,7 @@
namespace Null
{
class Renderer : public ::Renderer
class Renderer final : public ::Renderer
{
public:
Renderer();

View File

@ -4,21 +4,12 @@
#pragma once
#include <memory>
#include "VideoBackends/Null/NullTexture.h"
#include "VideoCommon/TextureCacheBase.h"
#include "VideoCommon/TextureConfig.h"
namespace Null
{
class TextureCache : public TextureCacheBase
class TextureCache final : public TextureCacheBase
{
public:
TextureCache() {}
~TextureCache() {}
protected:
void CopyEFB(AbstractStagingTexture* dst, const EFBCopyParams& params, u32 native_width,
u32 bytes_per_row, u32 num_blocks_y, u32 memory_stride,

View File

@ -3,10 +3,6 @@
// Refer to the license.txt file included.
#include "VideoBackends/Null/VertexManager.h"
#include "VideoBackends/Null/Render.h"
#include "VideoCommon/IndexGenerator.h"
#include "VideoCommon/VertexLoaderManager.h"
namespace Null
{

View File

@ -4,18 +4,15 @@
#pragma once
#include <memory>
#include <vector>
#include "VideoCommon/VertexManagerBase.h"
namespace Null
{
class VertexManager : public VertexManagerBase
class VertexManager final : public VertexManagerBase
{
public:
VertexManager();
~VertexManager();
~VertexManager() override;
protected:
void DrawCurrentBatch(u32 base_index, u32 num_indices, u32 base_vertex) override;

View File

@ -4,22 +4,17 @@
#pragma once
#include "Common/Common.h"
#include "VideoCommon/VideoBackendBase.h"
namespace Null
{
class VideoBackend : public VideoBackendBase
class VideoBackend final : public VideoBackendBase
{
bool Initialize(const WindowSystemInfo& wsi) override;
void Shutdown() override;
std::string GetName() const override { return "Null"; }
std::string GetDisplayName() const override
{
// i18n: Null is referring to the null video backend, which renders nothing
return _trans("Null");
}
std::string GetDisplayName() const override;
void InitBackendInfo() override;
};
} // namespace Null