Flutter Engine
The Flutter Engine
SkAlignedStorage.h
Go to the documentation of this file.
1// Copyright 2022 Google LLC
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
3
4#ifndef SkAlignedStorage_DEFINED
5#define SkAlignedStorage_DEFINED
6
7#include <cstddef>
8#include <iterator>
9
10template <int N, typename T> class SkAlignedSTStorage {
11public:
17
18 // Returns void* because this object does not initialize the
19 // memory. Use placement new for types that require a constructor.
20 void* get() { return fStorage; }
21 const void* get() const { return fStorage; }
22
23 // Act as a container of bytes because the storage is uninitialized.
24 std::byte* data() { return fStorage; }
25 const std::byte* data() const { return fStorage; }
26 size_t size() const { return std::size(fStorage); }
27
28private:
29 alignas(T) std::byte fStorage[sizeof(T) * N];
30};
31
32#endif // SkAlignedStorage_DEFINED
#define N
Definition: beziers.cpp:19
std::byte * data()
const std::byte * data() const
const void * get() const
SkAlignedSTStorage & operator=(const SkAlignedSTStorage &)=delete
SkAlignedSTStorage(SkAlignedSTStorage &&)=delete
size_t size() const
SkAlignedSTStorage(const SkAlignedSTStorage &)=delete
SkAlignedSTStorage & operator=(SkAlignedSTStorage &&)=delete
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
#define T
Definition: precompiler.cc:65