add batch API support to canvas, fixes #16454