Convert WebRtcVideoTrackSourceTest to use MappableSI instead of
GpuMemoryBuffers. This requires adding new apis to
TestSharedImageInterface which allows creating MappableSI with
MapCallbackController. This internally uses FakeGpuMemoryBuffer for now
which was earlier directly used by WebRtcVideoTrackSourceTest.
This is required for Webrtc tests where test wants the production code
to trigger ClientSharedImage::MapAsync() but wants to control when the
callback runs from inside the test. This is achieved by using a custom
MapCallbackController. The callback execution is deferred by registering
the callback with the provided |controller|. The test manually triggers
the mapping completion by invoking the |controller| later, simulating a
delayed (asynchronous) mapping. This is required to test delayed mapping
behavior.
After this change, FakeGpuMemoryBuffers are only used by
TestSharedImageInterface internally.
Bug: 404763488
Change-Id: If0df7e0e0bc2cad541c96e77f2a8cd94375ab87e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6523223
Commit-Queue: Philip Rogers <pdr@chromium.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Auto-Submit: vikas soni <vikassoni@chromium.org>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1460172}