summaryrefslogtreecommitdiff
path: root/quantum/painter/qp_draw_text.c
diff options
context:
space:
mode:
authorPablo Martínez <58857054+elpekenin@users.noreply.github.com>2024-02-16 14:58:00 +0100
committerGitHub <noreply@github.com>2024-02-17 00:58:00 +1100
commit3a0f11a66178116ee935dd5b58332962666de5f2 (patch)
treea43fb3e540581ed895fc30e047dcc67c72edd55d /quantum/painter/qp_draw_text.c
parentcf162f90fe64790961afafb6a1de21833b0fa6ad (diff)
[QP] Native palette support for fonts (#20645)
Co-authored-by: Joel Challis <git@zvecr.com>
Diffstat (limited to 'quantum/painter/qp_draw_text.c')
-rw-r--r--quantum/painter/qp_draw_text.c11
1 files changed, 2 insertions, 9 deletions
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);
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////