Currently, HTMLCanvasElement has its own toImageData() function.
OffscreenCavnasRenderingContext and webglRenderingContextBase has its
own toImageData() functions which are utilized by OffscreenCanvas.convertToBlob().
This is a bit messy and we need to clean up and unify all of them
as one single virtual function in CanvasRenderingContext.
Comment 1 by xlai@chromium.org
, Oct 20 2016