mirror of
https://gitee.com/openharmony/graphic_graphic_2d
synced 2024-11-27 17:21:51 +00:00
tdd
Signed-off-by: hsc <husichao1@huawei.com>
This commit is contained in:
parent
810b4fdc83
commit
8ffa48224a
@ -30,7 +30,8 @@ public:
|
||||
|
||||
class VSyncControllerCallback : public VSyncController::Callback {
|
||||
public:
|
||||
void OnVSyncEvent(int64_t now, int64_t period, uint32_t refreshRate, VSyncMode vsyncMode) override;
|
||||
void OnVSyncEvent(int64_t now, int64_t period,
|
||||
uint32_t refreshRate, VSyncMode vsyncMode, uint32_t vsyncMaxRefreshRate) override;
|
||||
void OnConnsRefreshRateChanged(const std::vector<std::pair<uint64_t, uint32_t>> &refreshRates) override;
|
||||
};
|
||||
|
||||
@ -48,7 +49,8 @@ void VSyncControllerTest::TearDownTestCase()
|
||||
vsyncController_ = nullptr;
|
||||
}
|
||||
|
||||
void VSyncControllerCallback::OnVSyncEvent(int64_t now, int64_t period, uint32_t refreshRate, VSyncMode vsyncMode) {}
|
||||
void VSyncControllerCallback::OnVSyncEvent(int64_t now, int64_t period,
|
||||
uint32_t refreshRate, VSyncMode vsyncMode, uint32_t vsyncMaxRefreshRate) {}
|
||||
|
||||
void VSyncControllerCallback::OnConnsRefreshRateChanged(const std::vector<std::pair<uint64_t, uint32_t>> &refreshRates)
|
||||
{
|
||||
|
@ -437,7 +437,7 @@ HWTEST_F(VSyncDistributorTest, OnVSyncTriggerTest001, Function | MediumTest| Lev
|
||||
ASSERT_EQ(vsyncDistributor->AddConnection(conn, 1), VSYNC_ERROR_OK);
|
||||
conns.emplace_back(conn);
|
||||
}
|
||||
vsyncDistributor->OnVSyncTrigger(1000000000, 8333333, 120, VSYNC_MODE_LTPO);
|
||||
vsyncDistributor->OnVSyncTrigger(1000000000, 8333333, 120, VSYNC_MODE_LTPO, 360);
|
||||
for (int i = 0; i < conns.size(); i++) {
|
||||
ASSERT_EQ(vsyncDistributor->RemoveConnection(conns[i]), VSYNC_ERROR_OK);
|
||||
}
|
||||
@ -458,7 +458,7 @@ HWTEST_F(VSyncDistributorTest, OnVSyncTriggerTest002, Function | MediumTest| Lev
|
||||
ASSERT_EQ(vsyncDistributor->AddConnection(conn, 1), VSYNC_ERROR_OK);
|
||||
conns.emplace_back(conn);
|
||||
}
|
||||
vsyncDistributor->OnVSyncTrigger(1000000000, -8333333, 120, VSYNC_MODE_LTPO);
|
||||
vsyncDistributor->OnVSyncTrigger(1000000000, -8333333, 120, VSYNC_MODE_LTPO, 360);
|
||||
for (int i = 0; i < conns.size(); i++) {
|
||||
ASSERT_EQ(vsyncDistributor->RemoveConnection(conns[i]), VSYNC_ERROR_OK);
|
||||
}
|
||||
@ -479,7 +479,7 @@ HWTEST_F(VSyncDistributorTest, OnVSyncTriggerTest003, Function | MediumTest| Lev
|
||||
ASSERT_EQ(vsyncDistributor->AddConnection(conn, 1), VSYNC_ERROR_OK);
|
||||
conns.emplace_back(conn);
|
||||
}
|
||||
vsyncDistributor->OnVSyncTrigger(1000000000, 8333333, 120, VSYNC_MODE_LTPS);
|
||||
vsyncDistributor->OnVSyncTrigger(1000000000, 8333333, 120, VSYNC_MODE_LTPS, 360);
|
||||
for (int i = 0; i < conns.size(); i++) {
|
||||
ASSERT_EQ(vsyncDistributor->RemoveConnection(conns[i]), VSYNC_ERROR_OK);
|
||||
}
|
||||
|
@ -78,12 +78,14 @@ void VSyncGeneratorTest::TearDownTestCase()
|
||||
|
||||
class VSyncGeneratorTestCallback : public VSyncGenerator::Callback {
|
||||
public:
|
||||
void OnVSyncEvent(int64_t now, int64_t period, uint32_t refreshRate, VSyncMode vsyncMode) override;
|
||||
void OnVSyncEvent(int64_t now, int64_t period,
|
||||
uint32_t refreshRate, VSyncMode vsyncMode, uint32_t vsyncMaxRefreshRate) override;
|
||||
void OnPhaseOffsetChanged(int64_t phaseOffset) override;
|
||||
void OnConnsRefreshRateChanged(const std::vector<std::pair<uint64_t, uint32_t>> &refreshRates) override;
|
||||
};
|
||||
|
||||
void VSyncGeneratorTestCallback::OnVSyncEvent(int64_t now, int64_t period, uint32_t refreshRate, VSyncMode vsyncMode)
|
||||
void VSyncGeneratorTestCallback::OnVSyncEvent(int64_t now, int64_t period,
|
||||
uint32_t refreshRate, VSyncMode vsyncMode, uint32_t vsyncMaxRefreshRate)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user