[media] Enable VDAs to request read lock fences, use in VTVDA.

VTVDA binds IOSurfaces to textures, and therefore it is possible for
a GL operation on the IOSurface to still be queued (at the platform
level) after all references to the IOSurface have been dropped.

This CL enables VDAs to request the READ_LOCK_FENCES_ENABLED flag on
their VideoFrames, which ensures that platform operations have
completed before references are dropped.

Bug: 934578
Change-Id: Ia369c66d06100f58f991494b354d00dc628b38c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1487698
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Dan Sanders <sandersd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#637946}
8 files changed