Merge pull request #18292 from smirnov-alexey:as/osd_serialization

[G-API]: Support render primitives serialization

* Add GOpaque and GArray serialization support

* Address review comments

* Remove holds() method

* Add serialization mechanism for render primitives

* Fix standalone mode

* Fix wchar_t error on win64

* Fix assert on windows

* Address review comments

* Fix GArray and GOpaque reset() method to store proper kind

* Reset wchar before deserializing it

* Fix wchar_t cross-platform issue

* Address review comments

* Fix wchar_t serialization and tests

* Remove FText serialization
This commit is contained in:
Alexey Smirnov
2020-09-21 22:08:58 +03:00
committed by GitHub
parent f52a2cf5e1
commit f6aa9ac304
11 changed files with 678 additions and 315 deletions
+9
View File
@@ -274,4 +274,13 @@ TEST(GArray_VectorRef, TestRvalue)
auto v = std::vector<int>{3, 5, -4};
EXPECT_EQ(vref.rref<int>(), v);
}
TEST(GArray_VectorRef, TestReset)
{
// Warning: this test is testing some not-very-public APIs
cv::detail::VectorRef vref(std::vector<int>{3, 5, -4});
EXPECT_EQ(cv::detail::OpaqueKind::CV_INT, vref.getKind());
vref.reset<int>();
EXPECT_EQ(cv::detail::OpaqueKind::CV_INT, vref.getKind());
}
} // namespace opencv_test