changeset 122:d3ee52820f6b draft

Tile: don't update pixmap on tile change That's too eager and incurs slowness if we change all the tile palettes. Instead, just invalidate the current pixmap and let the lazy methods recreate it.
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 02 Oct 2019 09:11:33 -0400
parents bfced396acca
children 7b3cb931be9c
files nes.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/nes.py
+++ b/nes.py
@@ -122,7 +122,7 @@
 
     def set_palette(self, new_palette):
         self.palette = new_palette.copy()
-        self.update_pixmap()
+        self._pixmap = None
 
     def update_pixmap(self):
         img_data = bytes(sum(self.tile, []))