Suppose I have a function for a watchface that runs periodically, controlled by a Timer. Let's call this function "renderLoop". This function does some time- and computation-intensive stuff and draws the results to an offscreen buffered bitmap.
The onUpdate( ) method, which runs every second, copies the contents of this buffered bitmap to the screen buffer.
My question is, which of the following describes how CIQ works:
- A) onUpdate( ) will interrupt renderLoop( ) whenever needed (pause execution of renderLoop( ) and then resume after onUpdate( ) completes)
- B) onUpdate( ) and renderLoop( ) will execute in parallel
- C) onUpdate( ) and renderLoop( ) will only ever execute sequentially (no parallelism or interruption)
- D) Something else entirely
In essence, I am wondering if I ever have to worry about a partially-rendered buffered bitmap being copied to the screen.
Right now I am using triple buffering to avoid this possibility, but I don't know if this is necessary. The memory overhead for triple buffering is nontrivial and I suspect it might be causing some crashes on physical devices.