on Draw Frame
fun onDrawFrame(@NonNull canvas: Canvas, onscreenWidth: Int, onscreenHeight: Int, scaleBmpPxToCanvasPx: Float, scaleCanvasDensity: Float, @NonNull userContext: Any)
Use onFrameDraw instead, which passes a canvas. Your userContext should be instead acquired by updating the data list in update. If this is not possible, you can simply hold a copy of the userContext when supplied to you in onProcessFrame.
Width and height should be accessed with getCameraDimensions, and scaleBmpPxToCanvasPx and scaleCanvasDensity should be assumed as 1.0f.