Flutter Engine
The Flutter Engine
testing
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 "
third_party/skia/include/core/SkRefCnt.h
"
12
#include "
third_party/skia/include/core/SkSize.h
"
13
#include "
third_party/skia/include/core/SkSurface.h
"
14
#include "
third_party/skia/include/gpu/GrDirectContext.h
"
15
16
namespace
flutter
{
17
18
namespace
testing {
19
20
class
TestVulkanSurface
{
21
public
:
22
static
std::unique_ptr<TestVulkanSurface>
Create
(
23
const
TestVulkanContext
& context,
24
const
SkISize
& surface_size);
25
26
bool
IsValid
()
const
;
27
28
sk_sp<SkImage>
GetSurfaceSnapshot
()
const
;
29
30
VkImage
GetImage
();
31
32
private
:
33
explicit
TestVulkanSurface
(
TestVulkanImage
&&
image
);
34
35
TestVulkanImage
image_;
36
sk_sp<SkSurface>
surface_;
37
};
38
39
}
// namespace testing
40
}
// namespace flutter
41
42
#endif
// FLUTTER_TESTING_TEST_VULKAN_SURFACE_H_
GrDirectContext.h
SkRefCnt.h
SkSize.h
SkSurface.h
flutter::testing::TestVulkanContext
Definition:
test_vulkan_context.h:21
flutter::testing::TestVulkanImage
Captures the lifetime of a test VkImage along with its bound memory.
Definition:
test_vulkan_image.h:20
flutter::testing::TestVulkanSurface
Definition:
test_vulkan_surface.h:20
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::GetSurfaceSnapshot
sk_sp< SkImage > GetSurfaceSnapshot() const
Definition:
test_vulkan_surface.cc:79
flutter::testing::TestVulkanSurface::Create
static std::unique_ptr< TestVulkanSurface > Create(const TestVulkanContext &context, const SkISize &surface_size)
Definition:
test_vulkan_surface.cc:25
sk_sp< SkImage >
SkRecords::image
sk_sp< const SkImage > image
Definition:
SkRecords.h:269
flutter
Definition:
asset_manager.cc:10
SkISize
Definition:
SkSize.h:16
Generated on Sun Jun 23 2024 21:55:19 for Flutter Engine by
1.9.4