Disable idle encoding for layout tests

This CL disables idle encoding in CanvasAsyncBlobCreator for layout tests.
The current timeout deadlines make it possible to wait more than 6 seconds
for the idle encoding to finish, which results in layout tests timeout.

This change also modifies the way slack time before idle task deadline
is calculated, trying to allow idle encoding proceed if we have enough
time to encode a smaller image row.

Bug: 860706
Change-Id: I7fdebcb84cc5ae7840a34126a0b9f1a6c0037f9e
Reviewed-on: https://chromium-review.googlesource.com/1142136
Reviewed-by: Justin Novosad <junov@chromium.org>
Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576871}
5 files changed