Implement very basic canvas rendering context logic. No visual display present.

Rebased #2115.