3.1.3 using BufferedBitmap (with the full palette for Anti Aliasing)

Moving to this new SDK has all of my existing watch faces no longer working, and running out of memory when using BufferedBitmap.  The faces were working before with the F5 and F5+ series, but these are also erroring out now too.  Initially, I figured it was an issue with the F6X since the resolution is now 280x280 vs. 240x240 and the size of the watch face background buffer may be larger than acceptable.  If I limit the palette to 16 colours and turn off font antialiasing, it works fine. 

I even tried to comment out code to reduce the memory used to a point where the  there should be enough memory for the bitmap, but this still isn't working.

Is there a new method for building an analog face with antialiased fonts?  

  • One way to save memory with an analogue watchface if only the second hand is updated at 1Hz, then you can shrink the size of the buffered bitmap to be half or a quarter of the screen size. Then every half (or quarter) of a minute you move the buffered bitmap to the next half (or quarter) of the display and redraw everything in the background to the buffered bitmap again. It will add extra cost once (or 3 times) per minute to the partial update, but averaged over the other 60 partial updates for the whole minute it should still be acceptable.

  • Hi

    Can you help with that : 

    "move the buffered bitmap to the next half " ???

    I undestand how to make an haff size buffer (with new Graphics.BufferedBitmap), how to redraw everything, and how to draw my buffer (with dc.drawBitmap)

    But how to draw in the buffer only half a screen ? Do I have to draw outside, and draw inside sperately ?

     

  • So there are some different ways to approach this, but I'll give some examples using a buffered bitmap which is half the width of the display (and the full height), and you can come up with the best method for you!

    Example 1 - draw everything that is in the background every time (simple, but expensive):

    • in onUpdate(), draw everything to the display
    • in onUpdate() or onPartialUpdate() at 1 second, draw everything to the buffered bitmap, but shifted left half the display width. So the buffer will have an image of the right half of the display. You can use this to redraw anything that needs redrawing on the right half for the next 30 seconds.
    • in onPartialUpdate at 30 seconds, draw everything to the buffered bitmap (but not shifted!). So the buffer now has an image of the left half of the display.

    Example 2 - just draw what is needed to the buffer

    • Same as example 1, but when you draw to the buffer you check every item you draw, and only draw it if it overlaps the area of the buffer

    Example 3 - just draw what is needed to the buffer, and draw individual items to only one half of the display (may or may not be cheaper)

    • in onUpdate() draw the right half of the background to the buffer
    • in onUpdate() draw the left half of the background to the display & then copy the whole buffer to the right half of the display
    • in onPartialUpdate() at 30 seconds draw the left half of the background to the buffer as in the other examples
  • OK, thanks, I will try this

  • We're having conversations about memory on the larger screen devices.

  • Still just a temporary workaround, but check this! ;)

    RealFace

  • Has the conversation lead anywhere?

  • Having same issues... 260 and 280 screens eats up memory... It seems that if I exceed the palette colors from 4 to 5 this happens. No matter if you have 14 colors, the memory usage jumps? Anyone come up with some sort of solution with demonstration?