Partial updates in onUpdate

Hi guys,

yesterday I tried to optimize my watch face in a way that I wanted to only draw changed portions of the screen in onUpdate. This works fine in the simulator but on a real watch it fails because of the transition animations when pressing up/down key. The problem is as follows:

for every block on the watch face (date, time, battery, activity) I have a member variable storing the last drawn value. When onUpdate is called I check whether the value changed. In case it didn't I simply skip repainting it (normally I would clear with background color and draw the value again). When the transition takes place from a widget back to the watch face in the first transition step all values are painted fine, but the next transition step does not repaint most of the values as they did not change. Unfortunately, as the screen moves, the first draw happens partially outside of the screen and thus those values need to be repainted when they scroll into view. So my concept seems not to work. Is there a better way to achieve this or is onUpdate always meant to redraw the complete screen? Is there a way to come to know when a transition finishes? That way I could redraw the screen after the transition and then update only changed data?

Thanks!

Bye
  • Got it. I have checked my watch face and in my case the offscreen buffer has a size of 26KB, but this is because I am able to limit it to several colors. In your case this wouldn't be possible as you do not know what colors might be used.

    Ok, everything is clear :)

    Bye