Store current pack operation as a queued command.

The pack pixels operation is split in two halves: a GPU
copy then a CPU readback. We defer the CPU readback until
we can't wait any longer. That is, we do the readback when
the user maps the buffer, or there's another readback or
internal operation.

This offers the benefits of doing as much GPU work as
asynchronously as possible, and only doing the readback
work on related API calls (map or subsequent pack calls).

BUG=angle:511

Change-Id: I95a01da2b0e842438b180e8cdbb382c9a46ae210
Reviewed-on: https://chromium-review.googlesource.com/197836
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
2 files changed