mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-23 07:02:25 +00:00
修复自动化框架概率截图黑屏
Signed-off-by: 王德海 <wangdehai2@huawei.com> Change-Id: I0893e2b4c0a1fce0c7c11397ed040e0b33067bc3
This commit is contained in:
parent
a29d1735fb
commit
a3f47fdbd9
@ -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_;
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user