summaryrefslogtreecommitdiff
path: root/quantum/painter/qp_draw.h
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/painter/qp_draw.h')
-rw-r--r--quantum/painter/qp_draw.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/quantum/painter/qp_draw.h b/quantum/painter/qp_draw.h
index 7094d80eaa..84b1946ca7 100644
--- a/quantum/painter/qp_draw.h
+++ b/quantum/painter/qp_draw.h
@@ -30,9 +30,11 @@ bool qp_internal_fillrect_helper_impl(painter_device_t device, uint16_t l, uint1
// Convert from input pixel data + palette to equivalent pixels
typedef int16_t (*qp_internal_byte_input_callback)(void* cb_arg);
typedef bool (*qp_internal_pixel_output_callback)(qp_pixel_t* palette, uint8_t index, void* cb_arg);
+typedef bool (*qp_internal_byte_output_callback)(uint8_t byte, void* cb_arg);
bool qp_internal_decode_palette(painter_device_t device, uint32_t pixel_count, uint8_t bits_per_pixel, qp_internal_byte_input_callback input_callback, void* input_arg, qp_pixel_t* palette, qp_internal_pixel_output_callback output_callback, void* output_arg);
bool qp_internal_decode_grayscale(painter_device_t device, uint32_t pixel_count, uint8_t bits_per_pixel, qp_internal_byte_input_callback input_callback, void* input_arg, qp_internal_pixel_output_callback output_callback, void* output_arg);
bool qp_internal_decode_recolor(painter_device_t device, uint32_t pixel_count, uint8_t bits_per_pixel, qp_internal_byte_input_callback input_callback, void* input_arg, qp_pixel_t fg_hsv888, qp_pixel_t bg_hsv888, qp_internal_pixel_output_callback output_callback, void* output_arg);
+bool qp_internal_send_bytes(painter_device_t device, uint32_t byte_count, qp_internal_byte_input_callback input_callback, void* input_arg, qp_internal_byte_output_callback output_callback, void* output_arg);
// Global variable used for interpolated pixel lookup table.
#if QUANTUM_PAINTER_SUPPORTS_256_PALETTE
@@ -82,4 +84,12 @@ struct qp_internal_pixel_output_state {
bool qp_internal_pixel_appender(qp_pixel_t* palette, uint8_t index, void* cb_arg);
+struct qp_internal_byte_output_state {
+ painter_device_t device;
+ uint32_t byte_write_pos;
+ uint32_t max_bytes;
+};
+
+bool qp_internal_byte_appender(uint8_t byteval, void* cb_arg);
+
qp_internal_byte_input_callback qp_internal_prepare_input_state(struct qp_internal_byte_input_state* input_state, painter_compression_t compression);