| Flutter Impeller |

blit_command_mtl.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_METAL_BLIT_COMMAND_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_BLIT_COMMAND_MTL_H_
7
8 #include <Metal/Metal.h>
9
10 #include "impeller/base/backend_cast.h"
11 #include "impeller/renderer/blit_command.h"
12
13 namespace impeller {
14
15 /// Mixin for dispatching Metal commands.
16 struct BlitEncodeMTL : BackendCast<BlitEncodeMTL, BlitCommand> {
17 virtual ~BlitEncodeMTL();
18
19 virtual std::string GetLabel() const = 0;
20
21 [[nodiscard]] virtual bool Encode(
22 id<MTLBlitCommandEncoder> encoder) const = 0;
23 };
24
25 struct BlitCopyTextureToTextureCommandMTL
26 : public BlitCopyTextureToTextureCommand,
27 public BlitEncodeMTL {
28 ~BlitCopyTextureToTextureCommandMTL() override;
29
30 std::string GetLabel() const override;
31
32 [[nodiscard]] bool Encode(id<MTLBlitCommandEncoder> encoder) const override;
33 };
34
35 struct BlitCopyTextureToBufferCommandMTL
36 : public BlitCopyTextureToBufferCommand,
37 public BlitEncodeMTL {
38 ~BlitCopyTextureToBufferCommandMTL() override;
39
40 std::string GetLabel() const override;
41
42 [[nodiscard]] bool Encode(id<MTLBlitCommandEncoder> encoder) const override;
43 };
44
45 struct BlitGenerateMipmapCommandMTL : public BlitGenerateMipmapCommand,
46 public BlitEncodeMTL {
47 ~BlitGenerateMipmapCommandMTL() override;
48
49 std::string GetLabel() const override;
50
51 [[nodiscard]] bool Encode(id<MTLBlitCommandEncoder> encoder) const override;
52 };
53
54 struct BlitCopyBufferToTextureCommandMTL
55 : public BlitCopyBufferToTextureCommand,
56 public BlitEncodeMTL {
57 ~BlitCopyBufferToTextureCommandMTL() override;
58
59 std::string GetLabel() const override;
60
61 [[nodiscard]] bool Encode(id<MTLBlitCommandEncoder> encoder) const override;
62 };
63
64 } // namespace impeller
65
66 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_BLIT_COMMAND_MTL_H_
impeller::BlitGenerateMipmapCommandMTL::GetLabel
std::string GetLabel() const override
Definition: blit_command_mtl.mm:144
impeller::BlitGenerateMipmapCommand
Definition: blit_command.h:38
impeller::BlitEncodeMTL::GetLabel
virtual std::string GetLabel() const =0
impeller::BlitCopyTextureToTextureCommandMTL
Definition: blit_command_mtl.h:25
impeller::BlitEncodeMTL
Mixin for dispatching Metal commands.
Definition: blit_command_mtl.h:16
impeller::BlitCopyTextureToBufferCommandMTL::Encode
bool Encode(id< MTLBlitCommandEncoder > encoder) const override
Definition: blit_command_mtl.mm:60
blit_command.h
impeller::BlitCopyBufferToTextureCommand
Definition: blit_command.h:32
impeller::BlitCopyTextureToBufferCommandMTL::~BlitCopyTextureToBufferCommandMTL
~BlitCopyTextureToBufferCommandMTL() override
impeller::BlitCopyTextureToBufferCommand
Definition: blit_command.h:25
impeller::BlitEncodeMTL::~BlitEncodeMTL
virtual ~BlitEncodeMTL()
impeller::BlitCopyTextureToTextureCommandMTL::~BlitCopyTextureToTextureCommandMTL
~BlitCopyTextureToTextureCommandMTL() override
impeller::BlitGenerateMipmapCommandMTL
Definition: blit_command_mtl.h:45
impeller::BlitCopyTextureToTextureCommandMTL::Encode
bool Encode(id< MTLBlitCommandEncoder > encoder) const override
Definition: blit_command_mtl.mm:21
impeller::BlitGenerateMipmapCommandMTL::Encode
bool Encode(id< MTLBlitCommandEncoder > encoder) const override
Definition: blit_command_mtl.mm:148
impeller::BlitCopyBufferToTextureCommandMTL::~BlitCopyBufferToTextureCommandMTL
~BlitCopyBufferToTextureCommandMTL() override
backend_cast.h
impeller::BlitCopyBufferToTextureCommandMTL::GetLabel
std::string GetLabel() const override
Definition: blit_command_mtl.mm:100
impeller::BlitGenerateMipmapCommandMTL::~BlitGenerateMipmapCommandMTL
~BlitGenerateMipmapCommandMTL() override
impeller::BlitCopyTextureToBufferCommandMTL
Definition: blit_command_mtl.h:35
impeller::BackendCast
Definition: backend_cast.h:13
impeller::BlitCopyTextureToTextureCommandMTL::GetLabel
std::string GetLabel() const override
Definition: blit_command_mtl.mm:17
impeller::BlitCopyTextureToBufferCommandMTL::GetLabel
std::string GetLabel() const override
Definition: blit_command_mtl.mm:56
impeller::BlitCopyBufferToTextureCommandMTL
Definition: blit_command_mtl.h:54
impeller
Definition: aiks_context.cc:10
impeller::BlitCopyBufferToTextureCommandMTL::Encode
bool Encode(id< MTLBlitCommandEncoder > encoder) const override
Definition: blit_command_mtl.mm:104
impeller::BlitEncodeMTL::Encode
virtual bool Encode(id< MTLBlitCommandEncoder > encoder) const =0
impeller::BlitCopyTextureToTextureCommand
Definition: blit_command.h:18