This is the first of two or three optimizations for the canvas renderer. It avoids re-drawing tiles in the per-layer canvases if the canvas is known to already contain the correct tile in that part.
In addition, an opaque flag is added to all sources. If a tile can be transparent, it will be blended with the existing data in the canvas, leading to a mix of old and new data, so we must clear that area of the canvas before writing the tile . However, if the tile is known to be opaque then we can avoid the clear. opaque is false by default (the slower but surer case), but is set to true for all provided tile sources that are known to return fully opaque tiles.
 It is possible that there may be a work around for this by setting the correct value for context.globalCompositeOperation, but I have not yet found the correct value.
Add canvas map to two layers demo
Not all opaque here (see e.g. toner-labels):
Thanks, fixed and branch updated with push --force. The Stamen source configuration is not correct, I'll open an issue for this.
Don't redraw already rendered tiles
Add opaque flag to ol.source.TileSource
The PR has been updated since @tschaub's comment. A proper fix to the Stamen tile source will follow very shortly.