VideoSW: Use more VideoCommon

Now we require lots of empty functions, but this removes by far more duplicated code.
This commit is contained in:
degasus
2015-10-09 20:50:36 +02:00
parent 7fcb5a803b
commit efbe5bc4b6
51 changed files with 529 additions and 2025 deletions

View File

@ -6,22 +6,40 @@
#include "Common/CommonTypes.h"
#include "Common/Thread.h"
#include "VideoBackends/Software/EfbInterface.h"
namespace SWRenderer
#include "VideoCommon/RenderBase.h"
class SWRenderer : public Renderer
{
void Init();
void Prepare();
void Shutdown();
public:
~SWRenderer() override;
void SetScreenshot(const char *_szFilename);
void RenderText(const char* pstr, int left, int top, u32 color);
void DrawDebugText();
static void Init();
static void Shutdown();
u8* GetNextColorTexture();
u8* GetCurrentColorTexture();
static u8* GetNextColorTexture();
static u8* GetCurrentColorTexture();
void SwapColorTexture();
void UpdateColorTexture(EfbInterface::yuv422_packed *xfb, u32 fbWidth, u32 fbHeight);
void Swap(u32 fbWidth, u32 fbHeight);
}
void RenderText(const std::string& pstr, int left, int top, u32 color) override;
u32 AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data) override;
void PokeEFB(EFBAccessType type, const EfbPokeData* points, size_t num_points) override {};
u16 BBoxRead(int index) override;
void BBoxWrite(int index, u16 value) override;
int GetMaxTextureSize() override { return 16 * 1024; };
TargetRectangle ConvertEFBRectangle(const EFBRectangle& rc) override;
void SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const EFBRectangle& rc, float Gamma) override;
void ClearScreen(const EFBRectangle& rc, bool colorEnable, bool alphaEnable, bool zEnable, u32 color, u32 z) override;
void ReinterpretPixelData(unsigned int convtype) override {}
bool SaveScreenshot(const std::string& filename, const TargetRectangle& rc) override { return true; };
};