Merge pull request #7678 from FoamyGuy/boundary_fill_background_tasks

do background tasks and handle interrupt during boundary fill
This commit is contained in:
Dan Halbert 2023-03-21 23:38:05 -04:00 committed by GitHub
commit c93560144b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -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)

View File

@ -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