Flutter Impeller
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 
11 
12 namespace impeller {
13 
14 class CommandEncoderVK;
15 class CommandBufferVK;
16 
17 class 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 ResizeTexture(const std::shared_ptr<Texture>& source,
42  const std::shared_ptr<Texture>& destination) override;
43 
44  // |BlitPass|
45  bool ConvertTextureToShaderRead(
46  const std::shared_ptr<Texture>& texture) override;
47 
48  // |BlitPass|
49  bool OnCopyTextureToTextureCommand(std::shared_ptr<Texture> source,
50  std::shared_ptr<Texture> destination,
51  IRect source_region,
52  IPoint destination_origin,
53  std::string label) override;
54 
55  // |BlitPass|
56  bool OnCopyTextureToBufferCommand(std::shared_ptr<Texture> source,
57  std::shared_ptr<DeviceBuffer> destination,
58  IRect source_region,
59  size_t destination_offset,
60  std::string label) override;
61 
62  // |BlitPass|
63  bool OnCopyBufferToTextureCommand(BufferView source,
64  std::shared_ptr<Texture> destination,
65  IRect destination_region,
66  std::string label,
67  uint32_t slice,
68  bool convert_to_read) override;
69  // |BlitPass|
70  bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
71  std::string label) override;
72 
73  BlitPassVK(const BlitPassVK&) = delete;
74 
75  BlitPassVK& operator=(const BlitPassVK&) = delete;
76 };
77 
78 } // namespace impeller
79 
80 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_VULKAN_BLIT_PASS_VK_H_
impeller::BlitPass
Blit passes encode blit into the underlying command buffer.
Definition: blit_pass.h:26
blit_pass.h
impeller::BlitPassVK::~BlitPassVK
~BlitPassVK() override
impeller::CommandBufferVK
Definition: command_buffer_vk.h:23
impeller::BufferView
Definition: buffer_view.h:15
impeller::BlitPassVK
Definition: blit_pass_vk.h:17
rect.h
impeller::TPoint< int64_t >
config.h
impeller
Definition: allocation.cc:12
impeller::TRect
Definition: rect.h:122