mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
FramebufferManagerBase: Get rid of explicit delete and new
This commit is contained in:
@ -4,7 +4,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <array>
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
|
||||
@ -70,7 +72,7 @@ protected:
|
||||
u32 xfbWidth = 0;
|
||||
u32 xfbHeight = 0;
|
||||
|
||||
XFBSourceBase* xfbSource = nullptr;
|
||||
std::unique_ptr<XFBSourceBase> xfbSource;
|
||||
};
|
||||
|
||||
typedef std::list<VirtualXFB> VirtualXFBListType;
|
||||
@ -78,7 +80,7 @@ protected:
|
||||
static unsigned int m_EFBLayers;
|
||||
|
||||
private:
|
||||
virtual XFBSourceBase* CreateXFBSource(unsigned int target_width, unsigned int target_height, unsigned int layers) = 0;
|
||||
virtual std::unique_ptr<XFBSourceBase> CreateXFBSource(unsigned int target_width, unsigned int target_height, unsigned int layers) = 0;
|
||||
// TODO: figure out why OGL is different for this guy
|
||||
virtual void GetTargetSize(unsigned int *width, unsigned int *height) = 0;
|
||||
|
||||
@ -93,10 +95,10 @@ private:
|
||||
static const XFBSourceBase* const* GetRealXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32* xfbCount);
|
||||
static const XFBSourceBase* const* GetVirtualXFBSource(u32 xfbAddr, u32 fbWidth, u32 fbHeight, u32* xfbCount);
|
||||
|
||||
static XFBSourceBase *m_realXFBSource; // Only used in Real XFB mode
|
||||
static std::unique_ptr<XFBSourceBase> m_realXFBSource; // Only used in Real XFB mode
|
||||
static VirtualXFBListType m_virtualXFBList; // Only used in Virtual XFB mode
|
||||
|
||||
static const XFBSourceBase* m_overlappingXFBArray[MAX_VIRTUAL_XFB];
|
||||
static std::array<const XFBSourceBase*, MAX_VIRTUAL_XFB> m_overlappingXFBArray;
|
||||
|
||||
static unsigned int s_last_xfb_width;
|
||||
static unsigned int s_last_xfb_height;
|
||||
|
Reference in New Issue
Block a user