Flutter Engine
Loading...
Searching...
No Matches
test_vulkan_image.h
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
5
#ifndef FLUTTER_TESTING_TEST_VULKAN_IMAGE_H_
6
#define FLUTTER_TESTING_TEST_VULKAN_IMAGE_H_
7
8
#include "
flutter/fml/macros.h
"
9
10
#include "
flutter/fml/memory/ref_ptr.h
"
11
#include "
flutter/vulkan/procs/vulkan_handle.h
"
12
13
namespace
flutter::testing
{
14
15
class
TestVulkanContext;
16
17
/// Captures the lifetime of a test VkImage along with its bound memory.
18
class
TestVulkanImage
{
19
public
:
20
TestVulkanImage
(
TestVulkanImage
&& other);
21
TestVulkanImage
&
operator=
(
TestVulkanImage
&& other);
22
23
~TestVulkanImage
();
24
25
VkImage
GetImage
();
26
27
private
:
28
TestVulkanImage
();
29
30
// The lifetime of the Vulkan state must exceed memory/image handles.
31
fml::RefPtr<TestVulkanContext>
context_;
32
33
vulkan::VulkanHandle<VkImage>
image_;
34
vulkan::VulkanHandle<VkDeviceMemory>
memory_;
35
36
FML_DISALLOW_COPY_AND_ASSIGN
(
TestVulkanImage
);
37
38
friend
TestVulkanContext
;
39
};
40
41
}
// namespace flutter::testing
42
43
#endif
// FLUTTER_TESTING_TEST_VULKAN_IMAGE_H_
flutter::testing::TestVulkanContext
Definition
test_vulkan_context.h:20
flutter::testing::TestVulkanImage
Captures the lifetime of a test VkImage along with its bound memory.
Definition
test_vulkan_image.h:18
flutter::testing::TestVulkanImage::TestVulkanImage
TestVulkanImage(TestVulkanImage &&other)
flutter::testing::TestVulkanImage::~TestVulkanImage
~TestVulkanImage()
flutter::testing::TestVulkanImage::operator=
TestVulkanImage & operator=(TestVulkanImage &&other)
flutter::testing::TestVulkanImage::GetImage
VkImage GetImage()
Definition
test_vulkan_image.cc:18
fml::RefPtr
Definition
ref_ptr.h:65
vulkan::VulkanHandle
Definition
vulkan_handle.h:17
macros.h
FML_DISALLOW_COPY_AND_ASSIGN
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition
macros.h:27
flutter::testing
Definition
native_assets_unittests.cc:10
ref_ptr.h
vulkan_handle.h
testing
test_vulkan_image.h
Generated on Thu Nov 6 2025 16:11:29 for Flutter Engine by
1.9.8