diff options
| author | Radomir Dopieralski <openstack@sheep.art.pl> | 2019-09-04 16:41:58 +0200 |
|---|---|---|
| committer | Radomir Dopieralski <openstack@sheep.art.pl> | 2019-09-04 16:41:58 +0200 |
| commit | 5f6228b6f02c229e84cc64c1e2b6a2332354c186 (patch) | |
| tree | a2c2435d2c330e71ff6d18918a881a709618f62f /shared-bindings | |
| parent | e92b5f7e3e16fc118929f373366ca79519ab1182 (diff) | |
Fix transactions in _stage after displayio changes
Also, move the rendering setup code to shared-module from
shared-bindings.
In CP 5.0, displayio_display_core_set_region_to_update now starts
its own transaction, so it has to be moved outside of the transaction
started by the render call.
Diffstat (limited to 'shared-bindings')
| -rw-r--r-- | shared-bindings/_stage/__init__.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/shared-bindings/_stage/__init__.c b/shared-bindings/_stage/__init__.c index d18d306f4..1154bbbf1 100644 --- a/shared-bindings/_stage/__init__.c +++ b/shared-bindings/_stage/__init__.c @@ -96,21 +96,8 @@ STATIC mp_obj_t stage_render(size_t n_args, const mp_obj_t *args) { scale = mp_obj_get_int(args[7]); } - // TODO: Everything below should be in shared-module because it's not argument parsing. - while (!displayio_display_core_begin_transaction(&display->core)) { - RUN_BACKGROUND_TASKS; - } - displayio_area_t area; - area.x1 = x0; - area.y1 = y0; - area.x2 = x1; - area.y2 = y1; - displayio_display_core_set_region_to_update(&display->core, display->set_column_command, display->set_row_command, NO_COMMAND, NO_COMMAND, display->data_as_commands, false, &area); - - display->core.send(display->core.bus, DISPLAY_COMMAND, CHIP_SELECT_TOGGLE_EVERY_BYTE, &display->write_ram_command, 1); render_stage(x0, y0, x1, y1, layers, layers_size, buffer, buffer_size, display, scale); - displayio_display_core_end_transaction(&display->core); return mp_const_none; } |
