Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
Create
static sk_sp< Effect > Create()
Definition
RefCntTest.cpp:117
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
sk_sp
Definition
SkRefCnt.h:220
image
sk_sp< SkImage > image
Definition
examples.cpp:29
flutter
Definition
asset_manager.cc:10
SkISize
Definition
SkSize.h:16
Generated on Fri Apr 26 2024 06:14:35 for Flutter Engine by
1.9.8