In this case I think the safe option is to use backSurface. w * backSurface.bytesPerPixel (even though that's probably the pitch you get anyway, but there's no guarantee).