Flutter Engine
Loading...
Searching...
No Matches
test_vulkan_surface.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_SURFACE_H_
6
#define FLUTTER_TESTING_TEST_VULKAN_SURFACE_H_
7
8
#include <memory>
9
#include "
flutter/testing/test_vulkan_context.h
"
10
11
#include "
flutter/display_list/geometry/dl_geometry_types.h
"
12
#include "third_party/skia/include/core/SkRefCnt.h"
13
#include "third_party/skia/include/core/SkSize.h"
14
#include "third_party/skia/include/core/SkSurface.h"
15
#include "third_party/skia/include/gpu/ganesh/GrDirectContext.h"
16
17
namespace
flutter::testing
{
18
19
class
TestVulkanSurface
{
20
public
:
21
static
std::unique_ptr<TestVulkanSurface>
Create
(
22
const
TestVulkanContext
& context,
23
const
DlISize
& surface_size);
24
25
bool
IsValid
()
const
;
26
27
sk_sp<SkImage>
GetSurfaceSnapshot
()
const
;
28
29
VkImage
GetImage
();
30
31
private
:
32
explicit
TestVulkanSurface
(
TestVulkanImage
&&
image
);
33
34
TestVulkanImage
image_;
35
sk_sp<SkSurface> surface_;
36
};
37
38
}
// namespace flutter::testing
39
40
#endif
// FLUTTER_TESTING_TEST_VULKAN_SURFACE_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::TestVulkanSurface
Definition
test_vulkan_surface.h:19
flutter::testing::TestVulkanSurface::IsValid
bool IsValid() const
Definition
test_vulkan_surface.cc:75
flutter::testing::TestVulkanSurface::GetImage
VkImage GetImage()
Definition
test_vulkan_surface.cc:109
flutter::testing::TestVulkanSurface::Create
static std::unique_ptr< TestVulkanSurface > Create(const TestVulkanContext &context, const DlISize &surface_size)
Definition
test_vulkan_surface.cc:24
flutter::testing::TestVulkanSurface::GetSurfaceSnapshot
sk_sp< SkImage > GetSurfaceSnapshot() const
Definition
test_vulkan_surface.cc:79
dl_geometry_types.h
image
FlutterVulkanImage * image
Definition
embedder_test_backingstore_producer_vulkan.cc:19
flutter::testing
Definition
native_assets_unittests.cc:10
impeller::TSize
Definition
size.h:25
test_vulkan_context.h
testing
test_vulkan_surface.h
Generated on Thu Nov 6 2025 16:11:29 for Flutter Engine by
1.9.8