From 3a0f11a66178116ee935dd5b58332962666de5f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Mart=C3=ADnez?= <58857054+elpekenin@users.noreply.github.com> Date: Fri, 16 Feb 2024 14:58:00 +0100 Subject: [QP] Native palette support for fonts (#20645) Co-authored-by: Joel Challis --- quantum/painter/qp_draw_text.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'quantum/painter/qp_draw_text.c') diff --git a/quantum/painter/qp_draw_text.c b/quantum/painter/qp_draw_text.c index 1ac5cab646..664c89c6e5 100644 --- a/quantum/painter/qp_draw_text.c +++ b/quantum/painter/qp_draw_text.c @@ -364,16 +364,9 @@ static inline bool qp_font_code_point_handler_drawglyph(qff_font_handle_t *qff_f // Move the x-position for the next glyph state->xpos += width; - // Decode the pixel data for the glyph + // Decode the pixel data for the glyph, and stream it uint32_t pixel_count = ((uint32_t)width) * height; - bool ret = qp_internal_decode_palette(state->device, pixel_count, qff_font->bpp, state->input_callback, state->input_state, qp_internal_global_pixel_lookup_table, qp_internal_pixel_appender, state->output_state); - - // Any leftovers need transmission as well. - if (ret && state->output_state->pixel_write_pos > 0) { - ret &= driver->driver_vtable->pixdata(state->device, qp_internal_global_pixdata_buffer, state->output_state->pixel_write_pos); - } - - return ret; + return qp_internal_appender(state->device, qff_font->bpp, pixel_count, state->input_callback, state->input_state); } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3