Revert of Simplify CanvasAsyncBlobCreator by removing ContextObserver and related tests (patchset #3 id:40001 of
https://codereview.chromium.org/1653253003/ )
Reason for revert:
This patch appears to be causing Document leaks. See, for example:
https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Leak/builds/17250
Original issue's description:
> Simplify CanvasAsyncBlobCreator by removing ContextObserver and related tests
>
> After we confirm to use idle-tasks implementation in toBlob, the cancellation
> mechanism for async thread implementation is no longer useful. First, compositor
> thread is definitely alive when users open Chrome browser; so the alternative
> code path for PNG image encoding when compositor thread is disabled would be
> unreachable in real-world situations; as a result, PNG image encoding happens
> in idle tasks only. Second, JPEG and WEBP image formats do not have progressive
> encoding at this moment and thus cancellation mechanism is not useful to them
> either; once their progressive encoding implementations are completed, they
> would be moved over to idle-tasks implementation too.
>
> This patch removes ContextObserver and CanvasAsyncBlobCreatorTest; it also moves
> all layout tests that use toBlob on PNG image formats to virtual/threaded as
> idle tasks require compositor thread to be alive. There is no need to perform
> tests on toBlob (png) in scenarios when compositor thread is not available.
>
> BUG=
581574
>
> Committed:
https://crrev.com/d3991457ab5fcb905f2a8a07657e26b16b2974fa
> Cr-Commit-Position: refs/heads/master@{#373068}
TBR=junov@chromium.org,xlai@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
581574
Committed:
https://crrev.com/2b4c30c9db157aedd467103693a1d9c31becd9b9
Cr-Commit-Position: refs/heads/master@{#373250}