From c7221b7dee88b67f94b5975f19f71451f7679639 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 27 Jan 2019 05:23:04 +0100 Subject: [PATCH] Painter: Tell the compiler to flatten Font::draw_glyph(). I think that concludes the Terminal stress test optimizations for now. --- AK/Compiler.h | 1 + SharedGraphics/Painter.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AK/Compiler.h b/AK/Compiler.h index 74abc1a4e8..78e43498e7 100644 --- a/AK/Compiler.h +++ b/AK/Compiler.h @@ -2,6 +2,7 @@ #define PACKED __attribute__ ((packed)) #define NORETURN __attribute__ ((noreturn)) +#define FLATTEN __attribute__ ((flatten)) #undef ALWAYS_INLINE #define ALWAYS_INLINE inline __attribute__ ((always_inline)) #define NEVER_INLINE __attribute__ ((noinline)) diff --git a/SharedGraphics/Painter.cpp b/SharedGraphics/Painter.cpp index f171aa7793..725b791420 100644 --- a/SharedGraphics/Painter.cpp +++ b/SharedGraphics/Painter.cpp @@ -182,7 +182,7 @@ void Painter::draw_bitmap(const Point& p, const CharacterBitmap& bitmap, Color c } } -void Painter::draw_glyph(const Point& point, char ch, Color color) +FLATTEN void Painter::draw_glyph(const Point& point, char ch, Color color) { draw_bitmap(point, font().glyph_bitmap(ch), color); }