Eli Zaretskii writes: >> From: Alex Gramiak >> Date: Wed, 08 May 2019 21:52:56 -0600 > > Each FRAME_X_DISPLAY call expands into applying a struct offset 4 > times. Do we care about the (small) additional inefficiency? AFAIU, > that was the cause for maintaining the result inside the glyph_string > structure in the first place. I doubt that it's much of a difference. However, it should be noted that in cases where the member is used several times in a single procedure, the FRAME_X_DISPLAY method is comparable or better: x_clear_glyph_string_rect, x_draw_stretch_glyph_string: Before: 3 offsets After: 4 offsets x_draw_image_foreground_1: Before: 4 offsets After: 4 offsets x_draw_image_glyph_string: Before: up to 9 offsets After: 4 offsets x_draw_underwave: Before 3 + 2 * ceiling ((xmax - x1)/dx) offsets After: 4 offsets >> The only other location that FRAME_X_DISPLAY appears in non-X code is in >> the argument to Free_Pixmap in image.c, which can hopefully be >> refactored out in a later patch; at that point the other terms can >> remove their trivial FRAME_X_DISPLAY definitions. > > So should we do both in one go, perhaps? Sure, here's a patch that does it: