summaryrefslogtreecommitdiff
path: root/quantum/painter/qp_draw_image.c
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/painter/qp_draw_image.c')
-rw-r--r--quantum/painter/qp_draw_image.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/quantum/painter/qp_draw_image.c b/quantum/painter/qp_draw_image.c
index fa80617242..361c21b906 100644
--- a/quantum/painter/qp_draw_image.c
+++ b/quantum/painter/qp_draw_image.c
@@ -1,4 +1,4 @@
-// Copyright 2021 Nick Brassel (@tzarc)
+// Copyright 2021-2023 Nick Brassel (@tzarc)
// SPDX-License-Identifier: GPL-2.0-or-later
#include "qp_internal.h"
@@ -124,7 +124,7 @@ typedef struct qgf_frame_info_t {
} qgf_frame_info_t;
static bool qp_drawimage_prepare_frame_for_stream_read(painter_device_t device, qgf_image_handle_t *qgf_image, uint16_t frame_number, qp_pixel_t fg_hsv888, qp_pixel_t bg_hsv888, qgf_frame_info_t *info) {
- struct painter_driver_t *driver = (struct painter_driver_t *)device;
+ painter_driver_t *driver = (painter_driver_t *)device;
// Drop out if we can't actually place the data we read out anywhere
if (!info) {
@@ -209,7 +209,7 @@ static bool qp_drawimage_prepare_frame_for_stream_read(painter_device_t device,
static bool qp_drawimage_recolor_impl(painter_device_t device, uint16_t x, uint16_t y, painter_image_handle_t image, int frame_number, qgf_frame_info_t *frame_info, qp_pixel_t fg_hsv888, qp_pixel_t bg_hsv888) {
qp_dprintf("qp_drawimage_recolor: entry\n");
- struct painter_driver_t *driver = (struct painter_driver_t *)device;
+ painter_driver_t *driver = (painter_driver_t *)device;
if (!driver->validate_ok) {
qp_dprintf("qp_drawimage_recolor: fail (validation_ok == false)\n");
return false;
@@ -254,8 +254,8 @@ static bool qp_drawimage_recolor_impl(painter_device_t device, uint16_t x, uint1
}
// Set up the input state
- struct qp_internal_byte_input_state input_state = {.device = device, .src_stream = &qgf_image->stream};
- qp_internal_byte_input_callback input_callback = qp_internal_prepare_input_state(&input_state, frame_info->compression_scheme);
+ qp_internal_byte_input_state_t input_state = {.device = device, .src_stream = &qgf_image->stream};
+ qp_internal_byte_input_callback input_callback = qp_internal_prepare_input_state(&input_state, frame_info->compression_scheme);
if (input_callback == NULL) {
qp_dprintf("qp_drawimage_recolor: fail (invalid image compression scheme)\n");
qp_comms_stop(device);
@@ -265,7 +265,7 @@ static bool qp_drawimage_recolor_impl(painter_device_t device, uint16_t x, uint1
bool ret = false;
if (frame_info->bpp <= 8) {
// Set up the output state
- struct qp_internal_pixel_output_state output_state = {.device = device, .pixel_write_pos = 0, .max_pixels = qp_internal_num_pixels_in_buffer(device)};
+ qp_internal_pixel_output_state_t output_state = {.device = device, .pixel_write_pos = 0, .max_pixels = qp_internal_num_pixels_in_buffer(device)};
// Decode the pixel data and stream to the display
ret = qp_internal_decode_palette(device, pixel_count, frame_info->bpp, input_callback, &input_state, qp_internal_global_pixel_lookup_table, qp_internal_pixel_appender, &output_state);
@@ -275,7 +275,7 @@ static bool qp_drawimage_recolor_impl(painter_device_t device, uint16_t x, uint1
}
} else {
// Set up the output state
- struct qp_internal_byte_output_state output_state = {.device = device, .byte_write_pos = 0, .max_bytes = qp_internal_num_pixels_in_buffer(device) * driver->native_bits_per_pixel / 8};
+ qp_internal_byte_output_state_t output_state = {.device = device, .byte_write_pos = 0, .max_bytes = qp_internal_num_pixels_in_buffer(device) * driver->native_bits_per_pixel / 8};
// Stream the raw pixel data to the display
uint32_t byte_count = pixel_count * frame_info->bpp / 8;
@@ -414,15 +414,3 @@ void qp_internal_animation_tick(void) {
static uint32_t last_anim_exec = 0;
deferred_exec_advanced_task(animation_executors, QUANTUM_PAINTER_CONCURRENT_ANIMATIONS, &last_anim_exec);
}
-
-////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-// Quantum Painter Core API: qp_internal_task
-
-void qp_internal_task(void) {
- qp_internal_animation_tick();
-#ifdef QUANTUM_PAINTER_LVGL_INTEGRATION_ENABLE
- // Run LVGL ticks
- void qp_lvgl_internal_tick(void);
- qp_lvgl_internal_tick();
-#endif
-}