Flutter Engine
The Flutter Engine
blit_pass_vk.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_IMPELLER_RENDERER_BACKEND_VULKAN_BLIT_PASS_VK_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_BLIT_PASS_VK_H_
7
8#include "flutter/impeller/base/config.h"
11
12namespace impeller {
13
14class CommandEncoderVK;
15class CommandBufferVK;
16
17class BlitPassVK final : public BlitPass {
18 public:
19 // |BlitPass|
20 ~BlitPassVK() override;
21
22 private:
23 friend class CommandBufferVK;
24
25 std::shared_ptr<CommandBufferVK> command_buffer_;
26 std::string label_;
27
28 explicit BlitPassVK(std::shared_ptr<CommandBufferVK> command_buffer);
29
30 // |BlitPass|
31 bool IsValid() const override;
32
33 // |BlitPass|
34 void OnSetLabel(std::string label) override;
35
36 // |BlitPass|
37 bool EncodeCommands(
38 const std::shared_ptr<Allocator>& transients_allocator) const override;
39
40 // |BlitPass|
41 bool ConvertTextureToShaderRead(
42 const std::shared_ptr<Texture>& texture) override;
43
44 // |BlitPass|
45 bool OnCopyTextureToTextureCommand(std::shared_ptr<Texture> source,
46 std::shared_ptr<Texture> destination,
47 IRect source_region,
48 IPoint destination_origin,
49 std::string label) override;
50
51 // |BlitPass|
52 bool OnCopyTextureToBufferCommand(std::shared_ptr<Texture> source,
53 std::shared_ptr<DeviceBuffer> destination,
54 IRect source_region,
55 size_t destination_offset,
56 std::string label) override;
57
58 // |BlitPass|
59 bool OnCopyBufferToTextureCommand(BufferView source,
60 std::shared_ptr<Texture> destination,
61 IRect destination_region,
62 std::string label,
63 uint32_t slice,
64 bool convert_to_read) override;
65 // |BlitPass|
66 bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
67 std::string label) override;
68
69 BlitPassVK(const BlitPassVK&) = delete;
70
71 BlitPassVK& operator=(const BlitPassVK&) = delete;
72};
73
74} // namespace impeller
75
76#endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_BLIT_PASS_VK_H_
~BlitPassVK() override
Blit passes encode blit into the underlying command buffer.
Definition: blit_pass.h:26
SkBitmap source
Definition: examples.cpp:28
FlTexture * texture