Implement Asynchronous image encoding for Canvas.toBlob
Main thread creates a new thread to carry out the computation-intensive asynchronous image encoding
operation. Afterwards the encoded image is passed back to the main thread to create blob and invoke user
callback.
Empty blob is passed to user callback in the senarios when the canvas has zero pixels or when the image
encoding fails.
This code review issue continues from the previous issue at
https://codereview.chromium.org/1331443009/
before the blink and chromium are merged.
BUG=
523414
BUG=
67587
Committed:
https://crrev.com/9dcdf861954dd8294faf3eefde89ea228f99c322
Cr-Commit-Position: refs/heads/master@{#350910}