FramebufferDisplay: dirty rows are physical
.. so they need a correct row count, which could be the "core.width" of a 90/180 rotated display. While I discovered this on the very unusual 320x960 display it could have affected any framebuffer display that was taller than it was wide, including sharp memory displays and rgbmatrix displays.
This commit is contained in:
parent
f80d08e207
commit
b3141933af
@ -252,7 +252,9 @@ STATIC void _refresh_display(framebufferio_framebufferdisplay_obj_t *self) {
|
|||||||
displayio_display_core_start_refresh(&self->core);
|
displayio_display_core_start_refresh(&self->core);
|
||||||
const displayio_area_t *current_area = _get_refresh_areas(self);
|
const displayio_area_t *current_area = _get_refresh_areas(self);
|
||||||
if (current_area) {
|
if (current_area) {
|
||||||
uint8_t dirty_row_bitmask[(self->core.height + 7) / 8];
|
bool transposed = (self->core.rotation == 90 || self->core.rotation == 270);
|
||||||
|
int row_count = transposed ? self->core.width : self->core.height;
|
||||||
|
uint8_t dirty_row_bitmask[(row_count + 7) / 8];
|
||||||
memset(dirty_row_bitmask, 0, sizeof(dirty_row_bitmask));
|
memset(dirty_row_bitmask, 0, sizeof(dirty_row_bitmask));
|
||||||
self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo);
|
self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo);
|
||||||
while (current_area != NULL) {
|
while (current_area != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user