DescriptionReland [Mojo Video Capture] Add test coverage for accelerated jpeg decoding
PatchSet 1 is state as reviewed previously in https://codereview.chromium.org/2735083002/
PatchSet 2 fixes the reason for the revert.
Description of issue and fix:
VideoCaptureBrowserTest.ReceiveFramesFromFakeCaptureDevice never called
VideoCaptureController::ReturnBuffer(). As a result, after the maximum number
of allowed in-flight buffers (which is 3) had been reached, subsequent frames
were dropped. The tests using the software decoding path would always pass,
because kMinFramesToReceive was set to 3. It would have failed if set to >3.
The new test case for the accelerated decoding path would pass if the fake
decoder would be initialized and used within the first 3 frames. It would fail
otherwise.
The fix is to call VideoCaptureController::ReturnBuffer() when receiving a
frame. To allow calling this synchronously from within an invokaction of
OnBufferReady(), the order of corresponding invocations in
VideoCaptureController had to be updated.
Description of original CL:
This CL adds test cases to VideoCaptureBrowserTest that exercise the code path
for accelerated jpeg decoding using a fake decode accelerator.
* Add a FakeJpegDecodeAccelerator that can run in the GPU process and decodes
jpeg frames in software using libyuv.
* Add a command-line flag kUseFakeJpegDecodeAccelerator to enable the fake
accelerator (and suppress any "real" ones if present).
* Fix threading-related DCHECKs in GpuJpegDecodeAccelerator::Client to match
what is actually happening. This is needed to make the new test cases pass.
It also fixes issue 688184 [1].
This CL is part of the Mojo Video Capture work. For the bigger picture,
see [2] CL14.
BUG=584797, 688184
TEST=
content_browsertests --gtest_filter="VideoCaptureBrowserTest.*"
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
TBR=posciak@chromium.org,piman@chromium.org,sandersd@chromium.org
Review-Url: https://codereview.chromium.org/2772963002
Cr-Commit-Position: refs/heads/master@{#461060}
Committed: https://chromium.googlesource.com/chromium/src/+/0f72e9da2531d02d80511e54584b6da18ffa41d3
Patch Set 1 : State as previously reviewed #Patch Set 2 : Fix bug in VideoCaptureBrowserTest #Patch Set 3 : Rebase to March 28 #Patch Set 4 : Merge-in CL for fixing DCHECK being hit on trybot and rebase to March 29 #Patch Set 5 : Rebase to March 30 #Dependent Patchsets: Messages
Total messages: 28 (21 generated)
|