Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
multi_arch_shader_archive.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_H_
6#define FLUTTER_IMPELLER_SHADER_ARCHIVE_MULTI_ARCH_SHADER_ARCHIVE_H_
7
8#include <map>
9#include <memory>
10
11#include "flutter/fml/macros.h"
12#include "flutter/fml/mapping.h"
15
16namespace impeller {
17
19 public:
20 static std::shared_ptr<ShaderArchive> CreateArchiveFromMapping(
21 const std::shared_ptr<const fml::Mapping>& mapping,
23
25 const std::shared_ptr<const fml::Mapping>& mapping);
26
28
29 std::shared_ptr<const fml::Mapping> GetArchive(
30 ArchiveRenderingBackend backend) const;
31
32 std::shared_ptr<ShaderArchive> GetShaderArchive(
33 ArchiveRenderingBackend backend) const;
34
35 bool IsValid() const;
36
37 private:
38 std::map<ArchiveRenderingBackend, std::shared_ptr<const fml::Mapping>>
39 backend_mappings_;
40 bool is_valid_ = false;
41
43
44 MultiArchShaderArchive& operator=(const MultiArchShaderArchive&) = delete;
45};
46
47} // namespace impeller
48
49#endif // FLUTTER_IMPELLER_SHADER_ARCHIVE_MULTI_ARCH_SHADER_ARCHIVE_H_
const char * backend
std::shared_ptr< ShaderArchive > GetShaderArchive(ArchiveRenderingBackend backend) const
std::shared_ptr< const fml::Mapping > GetArchive(ArchiveRenderingBackend backend) const
static std::shared_ptr< ShaderArchive > CreateArchiveFromMapping(const std::shared_ptr< const fml::Mapping > &mapping, ArchiveRenderingBackend backend)