Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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"
9#include "flutter/impeller/base/config.h"
12
13namespace impeller {
14
15class CommandEncoderVK;
16class CommandBufferVK;
17
18class 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|
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_
~BlitPassVK() override
void OnSetLabel(std::string label) override
bool OnCopyBufferToTextureCommand(BufferView source, std::shared_ptr< Texture > destination, IPoint destination_origin, std::string label) override
bool OnCopyTextureToBufferCommand(std::shared_ptr< Texture > source, std::shared_ptr< DeviceBuffer > destination, IRect source_region, size_t destination_offset, std::string label) override
bool EncodeCommands(const std::shared_ptr< Allocator > &transients_allocator) const override
Encode the recorded commands to the underlying command buffer.
bool OnGenerateMipmapCommand(std::shared_ptr< Texture > texture, std::string label) override
bool OnCopyTextureToTextureCommand(std::shared_ptr< Texture > source, std::shared_ptr< Texture > destination, IRect source_region, IPoint destination_origin, std::string label) override
bool IsValid() const override
Blit passes encode blit into the underlying command buffer.
Definition blit_pass.h:26
SkBitmap source
Definition examples.cpp:28
FlTexture * texture