Flutter Engine
The Flutter Engine
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_SHADER_ARCHIVE_WRITER_H_
6#define FLUTTER_IMPELLER_SHADER_ARCHIVE_SHADER_ARCHIVE_WRITER_H_
7
8#include <memory>
9#include <string>
10#include <vector>
11
12#include "flutter/fml/mapping.h"
14
15namespace impeller {
16
18 public:
20
22
23 [[nodiscard]] bool AddShaderAtPath(const std::string& path);
24
25 [[nodiscard]] bool AddShader(ArchiveShaderType type,
26 std::string name,
27 std::shared_ptr<fml::Mapping> mapping);
28
29 std::shared_ptr<fml::Mapping> CreateMapping() const;
30
31 private:
32 struct ShaderDescription {
34 std::string name;
35 std::shared_ptr<fml::Mapping> mapping;
36 };
37
38 std::vector<ShaderDescription> shader_descriptions_;
39
41
42 ShaderArchiveWriter& operator=(const ShaderArchiveWriter&) = delete;
43};
44
45} // namespace impeller
46
47#endif // FLUTTER_IMPELLER_SHADER_ARCHIVE_SHADER_ARCHIVE_WRITER_H_
GLenum type
bool AddShaderAtPath(const std::string &path)
bool AddShader(ArchiveShaderType type, std::string name, std::shared_ptr< fml::Mapping > mapping)
std::shared_ptr< fml::Mapping > CreateMapping() const
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57
DEF_SWITCHES_START aot vmservice shared library name
Definition: switches.h:32