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