summaryrefslogtreecommitdiff
path: root/wasp/drivers
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-02-03 22:32:53 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-02-03 22:32:53 (GMT)
commit118b7bab006323bf65a23c3fe3e1a0a30a91c17a (patch)
tree56d411d2ff9a2b1bfc7505ba916ac9301b0687c9 /wasp/drivers
parentb124a747dd6097a7ca6f111da46067b7d86abe5b (diff)
wasp: st7789: Reuse the pre-allocated linebuffer
Diffstat (limited to 'wasp/drivers')
-rw-r--r--wasp/drivers/st7789.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/wasp/drivers/st7789.py b/wasp/drivers/st7789.py
index 933df8d..8a9e4d6 100644
--- a/wasp/drivers/st7789.py
+++ b/wasp/drivers/st7789.py
@@ -98,8 +98,7 @@ class ST7789(object):
(sx, sy, rle) = image
self.set_window(pos[0], pos[1], sx, sy)
- # TODO: rework algorithm to allow us to reuse the line buffer
- buf = bytearray(2*sx)
+ buf = memoryview(self.linebuffer)[0:2*sx]
bp = 0
color = bg