From db924a4681f019a6372f5192693af5aede36d080 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 16 Jan 2018 23:23:52 +0000 Subject: Codechange: [Blitter] Change DrawLine to be templated This is remove per-pixel overheads due to use of the SetPixel virtual method. These overheads included: * expensive virtual method call which prevents inlining * palette lookup for every pixel * branch on whether palette animation is enabled on every pixel Regenerate project files. --- src/blitter/32bpp_base.hpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/blitter/32bpp_base.hpp') diff --git a/src/blitter/32bpp_base.hpp b/src/blitter/32bpp_base.hpp index 9b7627170..697593da6 100644 --- a/src/blitter/32bpp_base.hpp +++ b/src/blitter/32bpp_base.hpp @@ -23,6 +23,7 @@ public: /* virtual */ uint8 GetScreenDepth() { return 32; } /* virtual */ void *MoveTo(void *video, int x, int y); /* virtual */ void SetPixel(void *video, int x, int y, uint8 colour); + /* virtual */ void DrawLine(void *video, int x, int y, int x2, int y2, int screen_width, int screen_height, uint8 colour, int width, int dash); /* virtual */ void DrawRect(void *video, int width, int height, uint8 colour); /* virtual */ void CopyFromBuffer(void *video, const void *src, int width, int height); /* virtual */ void CopyToBuffer(const void *video, void *dst, int width, int height); -- cgit v1.2.3-70-g09d2