| Flutter Impeller |

blit_command_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 #pragma once
6
7 #include <memory>
8 #include "impeller/base/backend_cast.h"
9 #include "impeller/renderer/backend/vulkan/context_vk.h"
10 #include "impeller/renderer/blit_command.h"
11 #include "impeller/renderer/context.h"
12
13 namespace impeller {
14
15 class CommandEncoderVK;
16
17 // TODO(csg): Should these be backend castable to blit command?
18 /// Mixin for dispatching Vulkan commands.
19 struct BlitEncodeVK : BackendCast<BlitEncodeVK, BlitCommand> {
20 virtual ~BlitEncodeVK();
21
22 virtual std::string GetLabel() const = 0;
23
24 [[nodiscard]] virtual bool Encode(CommandEncoderVK& encoder) const = 0;
25 };
26
27 struct BlitCopyTextureToTextureCommandVK
28 : public BlitCopyTextureToTextureCommand,
29 public BlitEncodeVK {
30 ~BlitCopyTextureToTextureCommandVK() override;
31
32 std::string GetLabel() const override;
33
34 [[nodiscard]] bool Encode(CommandEncoderVK& encoder) const override;
35 };
36
37 struct BlitCopyTextureToBufferCommandVK : public BlitCopyTextureToBufferCommand,
38 public BlitEncodeVK {
39 ~BlitCopyTextureToBufferCommandVK() override;
40
41 std::string GetLabel() const override;
42
43 [[nodiscard]] bool Encode(CommandEncoderVK& encoder) const override;
44 };
45
46 struct BlitCopyBufferToTextureCommandVK : public BlitCopyBufferToTextureCommand,
47 public BlitEncodeVK {
48 ~BlitCopyBufferToTextureCommandVK() override;
49
50 std::string GetLabel() const override;
51
52 [[nodiscard]] bool Encode(CommandEncoderVK& encoder) const override;
53 };
54
55 struct BlitGenerateMipmapCommandVK : public BlitGenerateMipmapCommand,
56 public BlitEncodeVK {
57 ~BlitGenerateMipmapCommandVK() override;
58
59 std::string GetLabel() const override;
60
61 [[nodiscard]] bool Encode(CommandEncoderVK& encoder) const override;
62 };
63
64 } // namespace impeller
impeller::BlitGenerateMipmapCommand
Definition: blit_command.h:37
impeller::BlitGenerateMipmapCommandVK::GetLabel
std::string GetLabel() const override
Definition: blit_command_vk.cc:211
blit_command.h
impeller::BlitGenerateMipmapCommandVK::Encode
bool Encode(CommandEncoderVK &encoder) const override
Definition: blit_command_vk.cc:246
impeller::BlitEncodeVK
Mixin for dispatching Vulkan commands.
Definition: blit_command_vk.h:19
impeller::BlitCopyBufferToTextureCommandVK
Definition: blit_command_vk.h:46
impeller::BlitCopyTextureToTextureCommandVK::Encode
bool Encode(CommandEncoderVK &encoder) const override
Definition: blit_command_vk.cc:25
impeller::BlitCopyBufferToTextureCommand
Definition: blit_command.h:31
impeller::BlitCopyTextureToTextureCommandVK::GetLabel
std::string GetLabel() const override
Definition: blit_command_vk.cc:21
impeller::BlitCopyBufferToTextureCommandVK::Encode
bool Encode(CommandEncoderVK &encoder) const override
Definition: blit_command_vk.cc:159
impeller::BlitCopyTextureToBufferCommand
Definition: blit_command.h:24
backend_cast.h
impeller::BlitGenerateMipmapCommandVK::~BlitGenerateMipmapCommandVK
~BlitGenerateMipmapCommandVK() override
impeller::BlitCopyTextureToBufferCommandVK::GetLabel
std::string GetLabel() const override
Definition: blit_command_vk.cc:95
impeller::BlitCopyTextureToBufferCommandVK::Encode
bool Encode(CommandEncoderVK &encoder) const override
Definition: blit_command_vk.cc:99
impeller::BlitGenerateMipmapCommandVK
Definition: blit_command_vk.h:55
impeller::BlitEncodeVK::Encode
virtual bool Encode(CommandEncoderVK &encoder) const =0
impeller::BlitCopyTextureToBufferCommandVK
Definition: blit_command_vk.h:37
impeller::BackendCast
Definition: backend_cast.h:12
impeller::BlitCopyBufferToTextureCommandVK::~BlitCopyBufferToTextureCommandVK
~BlitCopyBufferToTextureCommandVK() override
context.h
impeller::BlitEncodeVK::GetLabel
virtual std::string GetLabel() const =0
impeller::BlitCopyTextureToTextureCommandVK
Definition: blit_command_vk.h:27
context_vk.h
impeller::BlitCopyTextureToBufferCommandVK::~BlitCopyTextureToBufferCommandVK
~BlitCopyTextureToBufferCommandVK() override
impeller::BlitCopyTextureToTextureCommandVK::~BlitCopyTextureToTextureCommandVK
~BlitCopyTextureToTextureCommandVK() override
impeller::CommandEncoderVK
Definition: command_encoder_vk.h:45
impeller
Definition: aiks_context.cc:10
impeller::BlitEncodeVK::~BlitEncodeVK
virtual ~BlitEncodeVK()
impeller::BlitCopyTextureToTextureCommand
Definition: blit_command.h:17
impeller::BlitCopyBufferToTextureCommandVK::GetLabel
std::string GetLabel() const override
Definition: blit_command_vk.cc:155