Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
impeller::testing::MockFence Class Referencefinal

#include <mock_vulkan.h>

Public Member Functions

 MockFence ()=default
 
VkResult GetStatus ()
 
void SetStatus (vk::Result result)
 

Static Public Member Functions

static void SetStatus (vk::UniqueFence &fence, vk::Result result)
 
static MockFenceGetRawPointer (vk::UniqueFence &fence)
 

Detailed Description

Definition at line 25 of file mock_vulkan.h.

Constructor & Destructor Documentation

◆ MockFence()

impeller::testing::MockFence::MockFence ( )
default

Member Function Documentation

◆ GetRawPointer()

static MockFence * impeller::testing::MockFence::GetRawPointer ( vk::UniqueFence &  fence)
inlinestatic

Definition at line 44 of file mock_vulkan.h.

44 {
45 // Cast the fence to a MockFence and get the result.
46 VkFence raw_fence = fence.get();
47 MockFence* mock_fence = reinterpret_cast<MockFence*>(raw_fence);
48 return mock_fence;
49 }

◆ GetStatus()

VkResult impeller::testing::MockFence::GetStatus ( )
inline

Definition at line 30 of file mock_vulkan.h.

30{ return static_cast<VkResult>(result_.load()); }
VkResult

◆ SetStatus() [1/2]

void impeller::testing::MockFence::SetStatus ( vk::Result  result)
inline

Definition at line 33 of file mock_vulkan.h.

33{ result_ = result; }
GAsyncResult * result

◆ SetStatus() [2/2]

static void impeller::testing::MockFence::SetStatus ( vk::UniqueFence &  fence,
vk::Result  result 
)
inlinestatic

Definition at line 36 of file mock_vulkan.h.

36 {
37 // Cast the fence to a MockFence and set the result.
38 VkFence raw_fence = fence.get();
39 MockFence* mock_fence = reinterpret_cast<MockFence*>(raw_fence);
40 mock_fence->SetStatus(result);
41 }

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