Generally, it would have been nice to implement a completely new TileSource, which allows you to directly retrieve images (or canvas-context) instead of only URLs. But the current implementation is different; the tiles are retrieved by invisible instances of OpenSeadragon. Every instance calls the cacheTile method, which in turn computes the unified, virtual tiles. I posted some example code in one of the comments.