Render: Get rid of explicit new and delete

This commit is contained in:
Lioncash
2015-12-22 18:47:20 -05:00
parent 14e976a5f1
commit da0e647346
6 changed files with 19 additions and 24 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -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;