Render timing
This commit is contained in:
@@ -154,6 +154,26 @@ void TestCompletedPollMissIsCounted()
|
||||
SystemFrameExchangeMetrics metrics = exchange.Metrics();
|
||||
Expect(metrics.completedPollMisses == 1, "completed poll miss is counted");
|
||||
}
|
||||
|
||||
void TestStableCompletedDepthCanBeObserved()
|
||||
{
|
||||
SystemFrameExchange exchange(MakeConfig(1));
|
||||
SystemFrame frame;
|
||||
Expect(exchange.AcquireForRender(frame), "stable-depth frame can be acquired");
|
||||
Expect(exchange.PublishCompleted(frame), "stable-depth frame can be completed");
|
||||
|
||||
Expect(
|
||||
exchange.WaitForStableCompletedDepth(1, std::chrono::milliseconds(1), std::chrono::milliseconds(50)),
|
||||
"stable completed depth can be observed");
|
||||
}
|
||||
|
||||
void TestStableCompletedDepthTimesOut()
|
||||
{
|
||||
SystemFrameExchange exchange(MakeConfig(1));
|
||||
Expect(
|
||||
!exchange.WaitForStableCompletedDepth(1, std::chrono::milliseconds(1), std::chrono::milliseconds(1)),
|
||||
"missing stable completed depth times out");
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -164,6 +184,8 @@ int main()
|
||||
TestGenerationValidationRejectsStaleFrames();
|
||||
TestPixelFormatAwareSizing();
|
||||
TestCompletedPollMissIsCounted();
|
||||
TestStableCompletedDepthCanBeObserved();
|
||||
TestStableCompletedDepthTimesOut();
|
||||
|
||||
if (gFailures != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user