mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Render: Get rid of explicit new and delete
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
FramebufferManagerBase *g_framebuffer_manager;
|
||||
std::unique_ptr<FramebufferManagerBase> g_framebuffer_manager;
|
||||
|
||||
std::unique_ptr<XFBSourceBase> FramebufferManagerBase::m_realXFBSource; // Only used in Real XFB mode
|
||||
FramebufferManagerBase::VirtualXFBListType FramebufferManagerBase::m_virtualXFBList; // Only used in Virtual XFB mode
|
||||
|
@ -104,4 +104,4 @@ private:
|
||||
static unsigned int s_last_xfb_height;
|
||||
};
|
||||
|
||||
extern FramebufferManagerBase *g_framebuffer_manager;
|
||||
extern std::unique_ptr<FramebufferManagerBase> g_framebuffer_manager;
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "VideoCommon/FramebufferManagerBase.h"
|
||||
#include "VideoCommon/MainBase.h"
|
||||
#include "VideoCommon/OpcodeDecoding.h"
|
||||
#include "VideoCommon/PostProcessing.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/Statistics.h"
|
||||
#include "VideoCommon/TextureCacheBase.h"
|
||||
@ -69,7 +70,7 @@ int Renderer::s_target_height;
|
||||
int Renderer::s_backbuffer_width;
|
||||
int Renderer::s_backbuffer_height;
|
||||
|
||||
PostProcessingShaderImplementation* Renderer::m_post_processor;
|
||||
std::unique_ptr<PostProcessingShaderImplementation> Renderer::m_post_processor;
|
||||
|
||||
TargetRectangle Renderer::target_rc;
|
||||
|
||||
|
@ -130,7 +130,7 @@ public:
|
||||
static PEControl::PixelFormat GetPrevPixelFormat() { return prev_efb_format; }
|
||||
static void StorePixelFormat(PEControl::PixelFormat new_format) { prev_efb_format = new_format; }
|
||||
|
||||
PostProcessingShaderImplementation* GetPostProcessor() { return m_post_processor; }
|
||||
PostProcessingShaderImplementation* GetPostProcessor() { return m_post_processor.get(); }
|
||||
// Max height/width
|
||||
virtual int GetMaxTextureSize() = 0;
|
||||
|
||||
@ -173,7 +173,7 @@ protected:
|
||||
|
||||
FPSCounter m_fps_counter;
|
||||
|
||||
static PostProcessingShaderImplementation* m_post_processor;
|
||||
static std::unique_ptr<PostProcessingShaderImplementation> m_post_processor;
|
||||
|
||||
private:
|
||||
static PEControl::PixelFormat prev_efb_format;
|
||||
|
Reference in New Issue
Block a user