Переглянути джерело

Painter: Tell the compiler to flatten Font::draw_glyph().

I think that concludes the Terminal stress test optimizations for now.
Andreas Kling 6 роки тому
батько
коміт
c7221b7dee
2 змінених файлів з 2 додано та 1 видалено
  1. 1 0
      AK/Compiler.h
  2. 1 1
      SharedGraphics/Painter.cpp

+ 1 - 0
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))

+ 1 - 1
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);
 }