diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2019-05-16 16:45:38 -0700 |
|---|---|---|
| committer | Scott Shawcroft <scott@tannewt.org> | 2019-05-21 17:41:06 -0700 |
| commit | 3fad7de8db7f1f317ab6d00a00a82e406ec6fb33 (patch) | |
| tree | d3c50c49fdbb62c69feec210531b5b02e3e6304d /tools/gen_display_resources.py | |
| parent | a888fe4c8e12144141b9c0730d3d25ebea33cbc7 (diff) | |
Rework the pixel computation to use areas
This changes the displayio pixel computation from per-pixel to
per-area. This is precursor work to updating portions of the screen
(#1169). It should provide mild speedups because bounds checks are
done once per area rather than once per pixel. Filling by area also
allows TileGrid to maintain a row-associative fill pattern even when
the display's refresh is orthogonal to it.
Diffstat (limited to 'tools/gen_display_resources.py')
| -rw-r--r-- | tools/gen_display_resources.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/gen_display_resources.py b/tools/gen_display_resources.py index ebea9dccc..b1fd04831 100644 --- a/tools/gen_display_resources.py +++ b/tools/gen_display_resources.py @@ -120,13 +120,15 @@ displayio_tilegrid_t supervisor_terminal_text_grid = {{ .base = {{ .type = &displayio_tilegrid_type }}, .bitmap = (displayio_bitmap_t*) &supervisor_terminal_font_bitmap, .pixel_shader = &supervisor_terminal_color, - .x = 16, - .y = 0, + .area = {{ + .x1 = 16, + .y1 = 0, + .x2 = {1} + 16, + .y2 = {2}, + }}, .bitmap_width_in_tiles = {0}, .width_in_tiles = 1, .height_in_tiles = 1, - .total_width = {1}, - .total_height = {2}, .tile_width = {1}, .tile_height = {2}, .tiles = NULL, |
