| Flutter Impeller |

multi_arch_shader_archive_writer.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_SHADER_ARCHIVE_MULTI_ARCH_SHADER_ARCHIVE_WRITER_H_
6 #define FLUTTER_IMPELLER_SHADER_ARCHIVE_MULTI_ARCH_SHADER_ARCHIVE_WRITER_H_
7
8 #include <map>
9
10 #include "flutter/fml/macros.h"
11 #include "flutter/fml/mapping.h"
12 #include "impeller/shader_archive/shader_archive_types.h"
13
14 namespace impeller {
15
16 class MultiArchShaderArchiveWriter {
17 public:
18 MultiArchShaderArchiveWriter();
19
20 ~MultiArchShaderArchiveWriter();
21
22 [[nodiscard]] bool RegisterShaderArchive(
23 ArchiveRenderingBackend backend,
24 std::shared_ptr<const fml::Mapping> mapping);
25
26 std::shared_ptr<fml::Mapping> CreateMapping() const;
27
28 private:
29 std::map<ArchiveRenderingBackend, std::shared_ptr<const fml::Mapping>>
30 archives_;
31
32 MultiArchShaderArchiveWriter(const MultiArchShaderArchiveWriter&) = delete;
33
34 MultiArchShaderArchiveWriter& operator=(const MultiArchShaderArchiveWriter&) =
35 delete;
36 };
37
38 } // namespace impeller
39
40 #endif // FLUTTER_IMPELLER_SHADER_ARCHIVE_MULTI_ARCH_SHADER_ARCHIVE_WRITER_H_
impeller::MultiArchShaderArchiveWriter::CreateMapping
std::shared_ptr< fml::Mapping > CreateMapping() const
Definition: multi_arch_shader_archive_writer.cc:44
shader_archive_types.h
impeller::MultiArchShaderArchiveWriter::RegisterShaderArchive
bool RegisterShaderArchive(ArchiveRenderingBackend backend, std::shared_ptr< const fml::Mapping > mapping)
Definition: multi_arch_shader_archive_writer.cc:16
impeller::MultiArchShaderArchiveWriter::~MultiArchShaderArchiveWriter
~MultiArchShaderArchiveWriter()
impeller::MultiArchShaderArchiveWriter
Definition: multi_arch_shader_archive_writer.h:16
impeller::MultiArchShaderArchiveWriter::MultiArchShaderArchiveWriter
MultiArchShaderArchiveWriter()
impeller::ArchiveRenderingBackend
ArchiveRenderingBackend
Definition: shader_archive_types.h:16
impeller
Definition: aiks_context.cc:10