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>
10
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
17namespace flutter::testing {
18
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:
33
34 TestVulkanImage image_;
35 sk_sp<SkSurface> surface_;
36};
37
38} // namespace flutter::testing
39
40#endif // FLUTTER_TESTING_TEST_VULKAN_SURFACE_H_
Captures the lifetime of a test VkImage along with its bound memory.
static std::unique_ptr< TestVulkanSurface > Create(const TestVulkanContext &context, const DlISize &surface_size)
sk_sp< SkImage > GetSurfaceSnapshot() const
FlutterVulkanImage * image