Add hardware buffer unit test from old skqp to skia.

This copies the hardware buffer unit test from, which was cherry picked
straight into skqp last year, into Skia proper.

There are not functional changes, but a few of the APIs have been updated
to work with newer Skia.

Bug: skia:
Change-Id: I2d7b2ed8b0b9314ca3e03e703a6a5ac53805275e
Reviewed-on: https://skia-review.googlesource.com/c/188034
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
This commit is contained in:
Greg Daniel 2019-01-30 15:13:22 -05:00 committed by Skia Commit-Bot
parent 6f59443c9c
commit 24d861d8bf
3 changed files with 1326 additions and 2 deletions

View File

@ -284,6 +284,7 @@ tests_sources = [
"$_tests/VerticesTest.cpp",
"$_tests/VkBackendSurfaceTest.cpp",
"$_tests/VkDrawableTest.cpp",
"$_tests/VkHardwareBufferTest.cpp",
"$_tests/VkMakeCopyPipelineTest.cpp",
"$_tests/VkWrapTests.cpp",
"$_tests/VptrTest.cpp",

File diff suppressed because it is too large Load Diff

View File

@ -180,6 +180,7 @@ public:
features, &debugCallback)) {
sk_gpu_test::FreeVulkanFeaturesStructs(features);
delete features;
delete extensions;
return nullptr;
}
if (debugCallback != VK_NULL_HANDLE) {
@ -226,8 +227,7 @@ protected:
grVkDestroyDevice(fVk.fDevice, nullptr);
#ifdef SK_ENABLE_VK_LAYERS
if (fDebugCallback != VK_NULL_HANDLE) {
ACQUIRE_VK_PROC_LOCAL(DestroyDebugReportCallbackEXT, fVk.fInstance);
grVkDestroyDebugReportCallbackEXT(fVk.fInstance, fDebugCallback, nullptr);
fDestroyDebugReportCallbackEXT(fVk.fInstance, fDebugCallback, nullptr);
}
#endif
grVkDestroyInstance(fVk.fInstance, nullptr);