Move FPSCounter calls to RenderBase.

This commit is contained in:
Jules Blok 2014-07-09 23:18:11 +02:00
parent a546ef3276
commit 1754cbda9d
4 changed files with 10 additions and 14 deletions

View File

@ -27,7 +27,6 @@
#include "VideoCommon/AVIDump.h"
#include "VideoCommon/BPFunctions.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/FPSCounter.h"
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h"
@ -38,8 +37,6 @@
namespace DX11
{
static int s_fps = 0;
static u32 s_LastAA = 0;
static Television s_television;
@ -181,8 +178,6 @@ Renderer::Renderer(void *&window_handle)
{
int x, y, w_temp, h_temp;
FPSCounter::Initialize();
Host_GetRenderWindowSize(x, y, w_temp, h_temp);
D3D::Create((HWND)window_handle);
@ -952,10 +947,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl
FramebufferManagerBase::SetLastXfbHeight(h);
}
// update FPS counter
if (XFBWrited)
s_fps = FPSCounter::Update();
// Flip/present backbuffer to frontbuffer here
D3D::Present();

View File

@ -36,7 +36,6 @@
#include "VideoCommon/BPStructs.h"
#include "VideoCommon/DriverDetails.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/FPSCounter.h"
#include "VideoCommon/ImageWrite.h"
#include "VideoCommon/OnScreenDisplay.h"
#include "VideoCommon/PixelEngine.h"
@ -85,7 +84,6 @@ VideoConfig g_ogl_config;
// Declarations and definitions
// ----------------------------
static int s_fps = 0;
static GLuint s_ShowEFBCopyRegions_VBO = 0;
static GLuint s_ShowEFBCopyRegions_VAO = 0;
static SHADER s_ShowEFBCopyRegions;
@ -340,7 +338,6 @@ Renderer::Renderer()
s_fps=0;
s_ShowEFBCopyRegions_VBO = 0;
s_blendMode = 0;
FPSCounter::Initialize();
bool bSuccess = true;
@ -1583,8 +1580,6 @@ void Renderer::SwapImpl(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangl
}
}
if (XFBWrited)
s_fps = FPSCounter::Update();
// ---------------------------------------------------------------------
if (!DriverDetails::HasBug(DriverDetails::BUG_BROKENSWAP))
{

View File

@ -29,6 +29,7 @@
#include "VideoCommon/CPMemory.h"
#include "VideoCommon/Debugger.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/FPSCounter.h"
#include "VideoCommon/FramebufferManagerBase.h"
#include "VideoCommon/MainBase.h"
#include "VideoCommon/OpcodeDecoding.h"
@ -64,6 +65,8 @@ int Renderer::s_LastEFBScale;
bool Renderer::s_skipSwap;
bool Renderer::XFBWrited;
unsigned int Renderer::s_fps = 0;
PEControl::PixelFormat Renderer::prev_efb_format = PEControl::INVALID_FMT;
unsigned int Renderer::efb_scale_numeratorX = 1;
unsigned int Renderer::efb_scale_numeratorY = 1;
@ -84,6 +87,8 @@ Renderer::Renderer()
OSDChoice = 0;
OSDTime = 0;
FPSCounter::Initialize();
}
Renderer::~Renderer()
@ -521,6 +526,9 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight, const EFBRectangle&
// TODO: merge more generic parts into VideoCommon
g_renderer->SwapImpl(xfbAddr, fbWidth, fbHeight, rc, Gamma);
if (XFBWrited)
s_fps = FPSCounter::Update();
frameCount++;
GFX_DEBUGGER_PAUSE_AT(NEXT_FRAME, true);

View File

@ -150,6 +150,8 @@ protected:
static bool s_skipSwap;
static bool XFBWrited;
static unsigned int s_fps;
private:
static PEControl::PixelFormat prev_efb_format;
static unsigned int efb_scale_numeratorX;