Fix bugs

* CircularQueue.c
Wrong pointed end of block.

* ccpi.c
Wait until blank canvas for render is prepared.