Fix stride related bug in Canvas immediate API