Merge pull request #7678 from FoamyGuy/boundary_fill_background_tasks
do background tasks and handle interrupt during boundary fill
This commit is contained in:
commit
c93560144b
@ -194,6 +194,8 @@
|
||||
|
||||
extern const struct _mp_print_t mp_stderr_print;
|
||||
|
||||
#define RUN_BACKGROUND_TASKS
|
||||
|
||||
#if !(defined(MICROPY_GCREGS_SETJMP) || defined(__x86_64__) || defined(__i386__) || defined(__thumb2__) || defined(__thumb__) || defined(__arm__))
|
||||
// Fall back to setjmp() implementation for discovery of GC pointers in registers.
|
||||
#define MICROPY_GCREGS_SETJMP (1)
|
||||
|
@ -24,6 +24,7 @@
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "shared/runtime/interrupt_char.h"
|
||||
#include "shared-bindings/bitmaptools/__init__.h"
|
||||
#include "shared-bindings/displayio/Bitmap.h"
|
||||
#include "shared-bindings/displayio/Palette.h"
|
||||
@ -376,6 +377,10 @@ void common_hal_bitmaptools_boundary_fill(displayio_bitmap_t *destination,
|
||||
}
|
||||
|
||||
mp_obj_list_get(fill_area, &list_length, &fill_points);
|
||||
RUN_BACKGROUND_TASKS;
|
||||
if (mp_hal_is_interrupted()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// set dirty the area so displayio will draw
|
||||
|
Loading…
x
Reference in New Issue
Block a user