Plan recording worker wake decisions
This commit is contained in:
@@ -119,6 +119,25 @@ void recording_export_clamps_progress_total(pp::tests::Harness& harness)
|
||||
PP_EXPECT(harness, plan.progress_total == std::numeric_limits<int>::max());
|
||||
}
|
||||
|
||||
void recording_worker_iteration_encodes_only_when_ready(pp::tests::Harness& harness)
|
||||
{
|
||||
const auto encode = pp::app::plan_recording_worker_iteration(true, true, true);
|
||||
const auto stopped = pp::app::plan_recording_worker_iteration(false, true, true);
|
||||
const auto missing_encoder = pp::app::plan_recording_worker_iteration(true, false, true);
|
||||
const auto missing_canvas = pp::app::plan_recording_worker_iteration(true, true, false);
|
||||
|
||||
PP_EXPECT(harness, encode.continue_running);
|
||||
PP_EXPECT(harness, encode.encode_frame);
|
||||
PP_EXPECT(harness, encode.clear_dirty_stroke);
|
||||
PP_EXPECT(harness, encode.update_frame_label);
|
||||
PP_EXPECT(harness, !stopped.continue_running);
|
||||
PP_EXPECT(harness, !stopped.encode_frame);
|
||||
PP_EXPECT(harness, missing_encoder.continue_running);
|
||||
PP_EXPECT(harness, !missing_encoder.encode_frame);
|
||||
PP_EXPECT(harness, missing_canvas.continue_running);
|
||||
PP_EXPECT(harness, !missing_canvas.encode_frame);
|
||||
}
|
||||
|
||||
void executor_dispatches_recording_lifecycle(pp::tests::Harness& harness)
|
||||
{
|
||||
FakeRecordingServices services;
|
||||
@@ -180,6 +199,7 @@ int main()
|
||||
recording_clear_resets_frames_and_preserves_platform_delete_flag);
|
||||
harness.run("recording export tracks frame count", recording_export_tracks_frame_count);
|
||||
harness.run("recording export clamps progress total", recording_export_clamps_progress_total);
|
||||
harness.run("recording worker iteration encodes only when ready", recording_worker_iteration_encodes_only_when_ready);
|
||||
harness.run("executor dispatches recording lifecycle", executor_dispatches_recording_lifecycle);
|
||||
harness.run("executor dispatches recording clear and export", executor_dispatches_recording_clear_and_export);
|
||||
return harness.finish();
|
||||
|
||||
Reference in New Issue
Block a user