Flutter Engine
The Flutter Engine
driver_info_vk_unittests.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
8
9namespace impeller::testing {
10
13
14TEST_P(DriverInfoVKTest, CanQueryDriverInfo) {
15 ASSERT_TRUE(GetContext());
16 const auto& driver_info =
17 SurfaceContextVK::Cast(*GetContext()).GetParent()->GetDriverInfo();
18 ASSERT_NE(driver_info, nullptr);
19 // 1.1 is the base Impeller version. The driver can't be lower than that.
20 ASSERT_TRUE(driver_info->GetAPIVersion().IsAtLeast(Version{1, 1, 0}));
21 ASSERT_NE(driver_info->GetVendor(), VendorVK::kUnknown);
22 ASSERT_NE(driver_info->GetDeviceType(), DeviceTypeVK::kUnknown);
23 ASSERT_NE(driver_info->GetDriverName(), "");
24}
25
26TEST_P(DriverInfoVKTest, CanDumpToLog) {
27 ASSERT_TRUE(GetContext());
28 const auto& driver_info =
29 SurfaceContextVK::Cast(*GetContext()).GetParent()->GetDriverInfo();
30 ASSERT_NE(driver_info, nullptr);
32 driver_info->DumpToLog();
33 ASSERT_TRUE(log.str().find("Driver Information") != std::string::npos);
34}
35
36} // namespace impeller::testing
static SurfaceContextVK & Cast(Context &base)
Definition: backend_cast.h:13
const std::shared_ptr< ContextVK > & GetParent() const
SK_API GrDirectContext * GetContext(const SkImage *src)
INSTANTIATE_VULKAN_PLAYGROUND_SUITE(DriverInfoVKTest)
TEST_P(AiksTest, CanRenderAdvancedBlendColorFilterWithSaveLayer)