natevw / wristmap

Maps on Pebble
http://wristmap.argyl.es/
GNU General Public License v3.0
9 stars 7 forks source link

Redraw only newly received lines (instead of whole layer) #6

Open natevw opened 11 years ago

natevw commented 11 years ago

Pebble performance notes guide says:

Pebble uses a line addressable display. This means that modifying a single pixel requires the entire line to be redrawn, thus it is equivalently expensive to draw between 1 and 144 pixels on a single line. The least efficient shape that can be drawn on a line addressable display is a maximum length vertical line, as this requires the entire display to be refreshed.

Where possible, prefer drawing frequently updated shapes that are wider than they are tall (i.e. longer in the x-dimension than the y-dimension).

When we get e.g. 3 rows in, we indeed have a wide line-addressable–friendly shape — however I suspect our layer_mark_dirty call causes the whole screen to be re-blitted instead. If we switch drawing to lower-level calls, this should be easily avoidable.