`ol.dom.createCanvasContext2D` can be used here.