Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
impeller::DebugReportVK Class Reference

#include <debug_report_vk.h>

Public Member Functions

 DebugReportVK (const CapabilitiesVK &caps, const vk::Instance &instance)
 
 ~DebugReportVK ()
 
bool IsValid () const
 

Detailed Description

Definition at line 14 of file debug_report_vk.h.

Constructor & Destructor Documentation

◆ DebugReportVK()

impeller::DebugReportVK::DebugReportVK ( const CapabilitiesVK caps,
const vk::Instance &  instance 
)

Definition at line 12 of file debug_report_vk.cc.

13 {
14 if (!caps.AreValidationsEnabled()) {
15 is_valid_ = true;
16 return;
17 }
18
19 vk::DebugUtilsMessengerCreateInfoEXT messenger_info;
20 messenger_info.messageSeverity =
21 vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning |
22 vk::DebugUtilsMessageSeverityFlagBitsEXT::eError;
23 messenger_info.messageType =
24 vk::DebugUtilsMessageTypeFlagBitsEXT::eGeneral |
25 vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance |
26 vk::DebugUtilsMessageTypeFlagBitsEXT::eValidation;
27 messenger_info.pUserData = this;
28 messenger_info.pfnUserCallback = DebugUtilsMessengerCallback;
29
30 auto messenger = instance.createDebugUtilsMessengerEXTUnique(messenger_info);
31
32 if (messenger.result != vk::Result::eSuccess) {
33 FML_LOG(ERROR) << "Could not create debug messenger: "
34 << vk::to_string(messenger.result);
35 return;
36 }
37
38 messenger_ = std::move(messenger.value);
39 is_valid_ = true;
40}
VkInstance instance
Definition: main.cc:48
#define FML_LOG(severity)
Definition: logging.h:82
static SkString to_string(int n)
Definition: nanobench.cpp:119
#define ERROR(message)
Definition: elf_loader.cc:260

◆ ~DebugReportVK()

impeller::DebugReportVK::~DebugReportVK ( )
default

Member Function Documentation

◆ IsValid()

bool impeller::DebugReportVK::IsValid ( ) const

Definition at line 44 of file debug_report_vk.cc.

44 {
45 return is_valid_;
46}

The documentation for this class was generated from the following files: