From 193dd9775971501d121ded8fe427c926ed312c31 Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 10 Nov 2016 12:45:19 +0100 Subject: [PATCH] VideoCommon: Drop FlipImageData. This function isn't used any more, and good code shouldn't use it at all. Use negative strides instead. --- Source/Core/VideoCommon/RenderBase.cpp | 13 ------------- Source/Core/VideoCommon/RenderBase.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index c1298e0822..623ac973ad 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -757,16 +757,3 @@ void Renderer::RunFrameDumps() } #endif } - -void Renderer::FlipImageData(u8* data, int w, int h, int pixel_width) -{ - for (int y = 0; y < h / 2; ++y) - { - for (int x = 0; x < w; ++x) - { - for (int delta = 0; delta < pixel_width; ++delta) - std::swap(data[(y * w + x) * pixel_width + delta], - data[((h - 1 - y) * w + x) * pixel_width + delta]); - } - } -} diff --git a/Source/Core/VideoCommon/RenderBase.h b/Source/Core/VideoCommon/RenderBase.h index 2de4034bdf..94f48d0b9b 100644 --- a/Source/Core/VideoCommon/RenderBase.h +++ b/Source/Core/VideoCommon/RenderBase.h @@ -122,8 +122,6 @@ public: virtual u16 BBoxRead(int index) = 0; virtual void BBoxWrite(int index, u16 value) = 0; - static void FlipImageData(u8* data, int w, int h, int pixel_width = 3); - // Finish up the current frame, print some stats static void Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const EFBRectangle& rc, u64 ticks, float Gamma = 1.0f);