renaming of RenderState to CanvasState, since it is canvas-specific