修复自动化框架概率截图黑屏

Signed-off-by: 王德海 <wangdehai2@huawei.com>
Change-Id: I0893e2b4c0a1fce0c7c11397ed040e0b33067bc3
This commit is contained in:
王德海 2024-08-30 11:05:40 +08:00
parent a29d1735fb
commit a3f47fdbd9
2 changed files with 4 additions and 5 deletions

View File

@ -93,7 +93,7 @@ void RSGraphicTest::TearDown()
}
RSGraphicTestDirector::Instance().FlushMessage();
RSGraphicTestDirector::Instance().WaitForVSync();
WaitTimeout(RSParameterParse::Instance().testCaseWaitTime);
const ::testing::TestInfo* const testInfo =
::testing::UnitTest::GetInstance()->current_test_info();
@ -131,7 +131,7 @@ void RSGraphicTest::TearDown()
GetRootNode()->ResetTestSurface();
RSGraphicTestDirector::Instance().FlushMessage();
RSGraphicTestDirector::Instance().WaitForVSync();
WaitTimeout(RSParameterParse::Instance().testCaseWaitTime);
++imageWriteId_;
}

View File

@ -108,7 +108,7 @@ RSGraphicTestDirector::~RSGraphicTestDirector()
{
rootNode_->screenSurfaceNode_->RemoveFromTree();
rsUiDirector_->SendMessages();
vsyncWaiter_ = nullptr;
sleep(1);
}
void RSGraphicTestDirector::Run()
@ -122,7 +122,6 @@ void RSGraphicTestDirector::Run()
[handler](const std::function<void()>& task, uint32_t delay) { handler->PostTask(task); });
runner->Run();
vsyncWaiter_ = std::make_shared<VSyncWaiter>(handler_, RSParameterParse::Instance().vsyncRate);
screenId_ = RSInterfaces::GetInstance().GetDefaultScreenId();
auto defaultDisplay = DisplayManager::GetInstance().GetDefaultDisplay();
@ -138,7 +137,7 @@ void RSGraphicTestDirector::Run()
rsUiDirector_->SetRSSurfaceNode(rootNode_->screenSurfaceNode_);
rsUiDirector_->SendMessages();
WaitForVSync();
sleep(1);
ResetImagePath();
}