Phase 4
This commit is contained in:
@@ -70,12 +70,14 @@ void TestInputUploadRequestUsesLatestValue()
|
||||
firstRequest.inputFrame.bytes = &firstPixel;
|
||||
firstRequest.inputFrame.width = 1920;
|
||||
firstRequest.videoState.captureTextureWidth = 1920;
|
||||
firstRequest.ownedBytes = { 1, 2, 3, 4 };
|
||||
queue.RequestInputUpload(firstRequest);
|
||||
|
||||
RenderInputUploadRequest secondRequest;
|
||||
secondRequest.inputFrame.bytes = &secondPixel;
|
||||
secondRequest.inputFrame.width = 1280;
|
||||
secondRequest.videoState.captureTextureWidth = 1280;
|
||||
secondRequest.ownedBytes = { 5, 6 };
|
||||
queue.RequestInputUpload(secondRequest);
|
||||
|
||||
const RenderCommandQueueMetrics metrics = queue.GetMetrics();
|
||||
@@ -88,6 +90,7 @@ void TestInputUploadRequestUsesLatestValue()
|
||||
Expect(request.inputFrame.bytes == &secondPixel, "latest input upload bytes pointer wins");
|
||||
Expect(request.inputFrame.width == 1280, "latest input upload frame wins");
|
||||
Expect(request.videoState.captureTextureWidth == 1280, "latest input upload state wins");
|
||||
Expect(request.ownedBytes.size() == 2 && request.ownedBytes[0] == 5 && request.ownedBytes[1] == 6, "latest input upload owned bytes win");
|
||||
Expect(!queue.TryTakeInputUpload(request), "input upload request is removed after consume");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user