summaryrefslogtreecommitdiff
path: root/src/video
diff options
context:
space:
mode:
Diffstat (limited to 'src/video')
-rw-r--r--src/video/allegro_v.cpp3
-rw-r--r--src/video/cocoa/wnd_quartz.mm3
-rw-r--r--src/video/cocoa/wnd_quickdraw.mm3
-rw-r--r--src/video/sdl_v.cpp3
-rw-r--r--src/video/win32_v.cpp3
5 files changed, 15 insertions, 0 deletions
diff --git a/src/video/allegro_v.cpp b/src/video/allegro_v.cpp
index 50fe0c499..960d7fb7c 100644
--- a/src/video/allegro_v.cpp
+++ b/src/video/allegro_v.cpp
@@ -24,6 +24,7 @@
#include "../network/network.h"
#include "../core/random_func.hpp"
#include "../core/math_func.hpp"
+#include "../framerate_type.h"
#include "allegro_v.h"
#include <allegro.h>
@@ -56,6 +57,8 @@ void VideoDriver_Allegro::MakeDirty(int left, int top, int width, int height)
static void DrawSurfaceToScreen()
{
+ PerformanceMeasurer framerate(PFE_VIDEO);
+
int n = _num_dirty_rects;
if (n == 0) return;
diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm
index 7bec27824..4245a3c18 100644
--- a/src/video/cocoa/wnd_quartz.mm
+++ b/src/video/cocoa/wnd_quartz.mm
@@ -33,6 +33,7 @@
#include "cocoa_v.h"
#include "../../core/math_func.hpp"
#include "../../gfx_func.h"
+#include "../../framerate_type.h"
/* On some old versions of MAC OS this may not be defined.
* Those versions generally only produce code for PPC. So it should be safe to
@@ -431,6 +432,8 @@ WindowQuartzSubdriver::~WindowQuartzSubdriver()
void WindowQuartzSubdriver::Draw(bool force_update)
{
+ PerformanceMeasurer framerate(PFE_VIDEO);
+
/* Check if we need to do anything */
if (this->num_dirty_rects == 0 || [ this->window isMiniaturized ]) return;
diff --git a/src/video/cocoa/wnd_quickdraw.mm b/src/video/cocoa/wnd_quickdraw.mm
index df10d8773..8475efb0f 100644
--- a/src/video/cocoa/wnd_quickdraw.mm
+++ b/src/video/cocoa/wnd_quickdraw.mm
@@ -32,6 +32,7 @@
#include "cocoa_v.h"
#include "../../core/math_func.hpp"
#include "../../gfx_func.h"
+#include "../../framerate_type.h"
/**
* Important notice regarding all modifications!!!!!!!
@@ -361,6 +362,8 @@ WindowQuickdrawSubdriver::~WindowQuickdrawSubdriver()
void WindowQuickdrawSubdriver::Draw(bool force_update)
{
+ PerformanceMeasurer framerate(PFE_VIDEO);
+
/* Check if we need to do anything */
if (this->num_dirty_rects == 0 || [ this->window isMiniaturized ]) return;
diff --git a/src/video/sdl_v.cpp b/src/video/sdl_v.cpp
index 81005ab04..f40c4b646 100644
--- a/src/video/sdl_v.cpp
+++ b/src/video/sdl_v.cpp
@@ -23,6 +23,7 @@
#include "../core/random_func.hpp"
#include "../core/math_func.hpp"
#include "../fileio_func.h"
+#include "../framerate_type.h"
#include "sdl_v.h"
#include <SDL.h>
@@ -148,6 +149,8 @@ static void CheckPaletteAnim()
static void DrawSurfaceToScreen()
{
+ PerformanceMeasurer framerate(PFE_VIDEO);
+
int n = _num_dirty_rects;
if (n == 0) return;
diff --git a/src/video/win32_v.cpp b/src/video/win32_v.cpp
index 9559163c3..0655065a6 100644
--- a/src/video/win32_v.cpp
+++ b/src/video/win32_v.cpp
@@ -23,6 +23,7 @@
#include "../progress.h"
#include "../window_gui.h"
#include "../window_func.h"
+#include "../framerate_type.h"
#include "win32_v.h"
#include <windows.h>
#include <imm.h>
@@ -359,6 +360,8 @@ bool VideoDriver_Win32::MakeWindow(bool full_screen)
/** Do palette animation and blit to the window. */
static void PaintWindow(HDC dc)
{
+ PerformanceMeasurer framerate(PFE_VIDEO);
+
HDC dc2 = CreateCompatibleDC(dc);
HBITMAP old_bmp = (HBITMAP)SelectObject(dc2, _wnd.dib_sect);
HPALETTE old_palette = SelectPalette(dc, _wnd.gdi_palette, FALSE);