Skip to content

Commit

Permalink
Optimize partial update after full update
Browse files Browse the repository at this point in the history
  • Loading branch information
Erik Corry committed Oct 30, 2023
1 parent aed0a71 commit 48abbb3
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pixel_display.toit
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,12 @@ abstract class PixelDisplay implements Window:
speed_ = speed
if speed < 10 or driver_.flags & FLAG_PARTIAL_UPDATES == 0:
draw_entire_display_
if dirty_: bitmap_zap dirty_ CLEAN_
return

// Send data for the whole screen, even if only part of it changed.
if speed < 50: bitmap_zap dirty_ DIRTY_

// TODO(kasper): Once we've started a partial update, we need to make sure we refresh,
// because otherwise the lock in the display code in the kernel will not be released.
driver_.start_partial_update speed
refreshed := false
try:
Expand Down

0 comments on commit 48abbb3

Please sign in to comment.