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 
8 #include "flutter/fml/macros.h"
12 
13 namespace impeller {
14 
15 class CommandEncoderVK;
16 class CommandBufferVK;
17 
18 class BlitPassVK final : public BlitPass {
19  public:
20  // |BlitPass|
21  ~BlitPassVK() override;
22 
23  private:
24  friend class CommandBufferVK;
25 
26  std::weak_ptr<CommandBufferVK> command_buffer_;
27  std::vector<std::unique_ptr<BlitEncodeVK>> commands_;
28  std::string label_;
29 
30  explicit BlitPassVK(std::weak_ptr<CommandBufferVK> command_buffer);
31 
32  // |BlitPass|
33  bool IsValid() const override;
34 
35  // |BlitPass|
36  void OnSetLabel(std::string label) override;
37 
38  // |BlitPass|
39  bool EncodeCommands(
40  const std::shared_ptr<Allocator>& transients_allocator) const override;
41 
42  // |BlitPass|
43  bool OnCopyTextureToTextureCommand(std::shared_ptr<Texture> source,
44  std::shared_ptr<Texture> destination,
45  IRect source_region,
46  IPoint destination_origin,
47  std::string label) override;
48 
49  // |BlitPass|
50  bool OnCopyTextureToBufferCommand(std::shared_ptr<Texture> source,
51  std::shared_ptr<DeviceBuffer> destination,
52  IRect source_region,
53  size_t destination_offset,
54  std::string label) override;
55 
56  // |BlitPass|
57  bool OnCopyBufferToTextureCommand(BufferView source,
58  std::shared_ptr<Texture> destination,
59  IPoint destination_origin,
60  std::string label) override;
61  // |BlitPass|
62  bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
63  std::string label) override;
64 
65  BlitPassVK(const BlitPassVK&) = delete;
66 
67  BlitPassVK& operator=(const BlitPassVK&) = delete;
68 };
69 
70 } // namespace impeller
71 
72 #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_command_vk.h
blit_pass.h
impeller::BlitPassVK::~BlitPassVK
~BlitPassVK() override
impeller::CommandBufferVK
Definition: command_buffer_vk.h:18
impeller::BufferView
Definition: buffer_view.h:15
impeller::BlitPassVK
Definition: blit_pass_vk.h:18
impeller::TPoint< int64_t >
config.h
impeller
Definition: aiks_blur_unittests.cc:20
impeller::TRect< int64_t >