Flutter Engine
The Flutter Engine
|
Namespaces | |
namespace | benchmarking |
namespace | icu |
namespace | internal |
namespace | jni |
namespace | paths |
namespace | scoped_policy |
namespace | state |
namespace | testing |
namespace | tracing |
Typedefs | |
typedef AsciiTrie::TrieNode | TrieNode |
typedef AsciiTrie::TrieNodePtr | TrieNodePtr |
using | Base32DecodeConverter = BitConverter< 5, 8, 16 > |
using | Base32EncodeConverter = BitConverter< 8, 5, 16 > |
using | closure = std::function< void()> |
using | DelayedTaskQueue = std::priority_queue< DelayedTask, std::deque< DelayedTask >, std::greater< DelayedTask > > |
using | FileVisitor = std::function< bool(const fml::UniqueFD &directory, const std::string &filename)> |
typedef int | LogSeverity |
template<typename B > | |
using | ScopedBlock = ScopedTypeRef< B, internal::ScopedBlockTraits< B > > |
using | WideStringConverter = std::wstring_convert< std::codecvt_utf8_utf16< wchar_t >, wchar_t > |
typedef void * | RasterThreadMergerId |
using | Utf16StringConverter = std::wstring_convert< std::codecvt_utf8_utf16< char16_t >, char16_t > |
typedef std::function< void()> | ThreadFunction |
using | Milliseconds = std::chrono::duration< double, std::milli > |
using | UniqueFD = UniqueObject< int, internal::os_unix::UniqueFDTraits > |
using | UniqueDir = UniqueObject< DIR *, internal::os_unix::UniqueDirTraits > |
Enumerations | |
enum class | CpuAffinity { kPerformance , kEfficiency , kNotPerformance } |
enum class | FilePermission { kRead , kWrite , kReadWrite } |
enum class | FlushType { kSingle , kAll } |
enum class | RasterThreadStatus { kRemainsMerged , kRemainsUnmerged , kUnmergedNow } |
enum class | StatusCode { kOk , kCancelled , kUnknown , kInvalidArgument , kDeadlineExceeded , kNotFound , kAlreadyExists , kPermissionDenied , kResourceExhausted , kFailedPrecondition , kAborted , kOutOfRange , kUnimplemented , kInternal , kUnavailable , kDataLoss , kUnauthenticated } |
enum class | TaskSourceGrade { kUserInteraction , kDartEventLoop , kUnspecified } |
Functions | ||
static std::string | GetSymbolName (void *symbol) | |
static int | Backtrace (void **symbols, int size) | |
std::string | BacktraceHere (size_t offset) | |
static std::string | SignalNameToString (int signal) | |
static void | ToggleSignalHandlers (bool set) | |
static void | SignalHandler (int signal) | |
void | InstallCrashHandler () | |
bool | IsCrashHandlingSupported () | |
std::pair< bool, std::string > | Base32Encode (std::string_view input) | |
std::pair< bool, std::string > | Base32Decode (const std::string &input) | |
std::vector< std::string > | CommandLineToArgv (const CommandLine &command_line) | |
template<typename InputIterator > | ||
CommandLine | CommandLineFromIteratorsFindFirstPositionalArg (InputIterator first, InputIterator last, InputIterator *first_positional_arg) | |
template<typename InputIterator > | ||
CommandLine | CommandLineFromIterators (InputIterator first, InputIterator last) | |
template<typename InputIterator > | ||
CommandLine | CommandLineFromIteratorsWithArgv0 (const std::string &argv0, InputIterator first, InputIterator last) | |
std::optional< CommandLine > | CommandLineFromPlatform () | |
CommandLine | CommandLineFromArgcArgv (int argc, const char *const *argv) | |
CommandLine | CommandLineFromPlatformOrArgcArgv (int argc, const char *const *argv) | |
template<typename StringType > | ||
CommandLine | CommandLineFromInitializerList (std::initializer_list< StringType > argv) | |
template<class Collection = std::unordered_map<class Key, class Value, class Hash, class Equal>> | ||
void | erase_if (Collection &container, std::function< bool(typename Collection::iterator)> predicate) | |
std::optional< size_t > | EfficiencyCoreCount () | |
Request count of efficiency cores. More... | ||
bool | RequestAffinity (CpuAffinity affinity) | |
Request the given affinity for the current thread. More... | ||
std::optional< int64_t > | ReadIntFromFile (const std::string &path) | |
template<typename T , class = std::enable_if_t<kIsByteSwappableV<T>>> | ||
constexpr T | ByteSwap (T n) | |
Flips the endianness of the given value. The given value must be an integral type of size 1, 2, 4, or 8. More... | ||
template<typename T , class = std::enable_if_t<kIsByteSwappableV<T>>> | ||
constexpr T | BigEndianToArch (T n) | |
Convert a known big endian value to match the endianness of the current architecture. This is effectively a cross platform ntohl/ntohs (as network byte order is always Big Endian). The given value must be an integral type of size 1, 2, 4, or 8. More... | ||
template<typename T , class = std::enable_if_t<kIsByteSwappableV<T>>> | ||
constexpr T | LittleEndianToArch (T n) | |
Convert a known little endian value to match the endianness of the current architecture. The given value must be an integral type of size 1, 2, 4, or 8. More... | ||
static fml::UniqueFD | CreateDirectory (const fml::UniqueFD &base_directory, const std::vector< std::string > &components, FilePermission permission, size_t index) | |
fml::UniqueFD | CreateDirectory (const fml::UniqueFD &base_directory, const std::vector< std::string > &components, FilePermission permission) | |
bool | VisitFilesRecursively (const fml::UniqueFD &directory, const FileVisitor &visitor) | |
fml::UniqueFD | OpenFileReadOnly (const fml::UniqueFD &base_directory, const char *path) | |
fml::UniqueFD | OpenDirectoryReadOnly (const fml::UniqueFD &base_directory, const char *path) | |
bool | RemoveFilesInDirectory (const fml::UniqueFD &directory) | |
bool | RemoveDirectoryRecursively (const fml::UniqueFD &parent, const char *directory_name) | |
std::string | CreateTemporaryDirectory () | |
fml::UniqueFD | OpenFile (const char *path, bool create_if_necessary, FilePermission permission) | |
This can open a directory on POSIX, but not on Windows. More... | ||
fml::UniqueFD | OpenFile (const fml::UniqueFD &base_directory, const char *path, bool create_if_necessary, FilePermission permission) | |
This can open a directory on POSIX, but not on Windows. More... | ||
fml::UniqueFD | OpenDirectory (const char *path, bool create_if_necessary, FilePermission permission) | |
fml::UniqueFD | OpenDirectory (const fml::UniqueFD &base_directory, const char *path, bool create_if_necessary, FilePermission permission) | |
fml::UniqueFD | Duplicate (fml::UniqueFD::element_type descriptor) | |
bool | IsDirectory (const fml::UniqueFD &directory) | |
bool | IsDirectory (const fml::UniqueFD &base_directory, const char *path) | |
bool | IsFile (const std::string &path) | |
bool | TruncateFile (const fml::UniqueFD &file, size_t size) | |
bool | FileExists (const fml::UniqueFD &base_directory, const char *path) | |
bool | UnlinkDirectory (const char *path) | |
bool | UnlinkDirectory (const fml::UniqueFD &base_directory, const char *path) | |
bool | UnlinkFile (const char *path) | |
bool | UnlinkFile (const fml::UniqueFD &base_directory, const char *path) | |
bool | WriteAtomically (const fml::UniqueFD &base_directory, const char *file_name, const Mapping &mapping) | |
bool | VisitFiles (const fml::UniqueFD &directory, const FileVisitor &visitor) | |
template<class Type > | ||
constexpr void | HashCombineSeed (std::size_t &seed, Type arg) | |
template<class Type , class... Rest> | ||
constexpr void | HashCombineSeed (std::size_t &seed, Type arg, Rest... other_args) | |
constexpr std::size_t | HashCombine () | |
template<class... Type> | ||
constexpr std::size_t | HashCombine (Type... args) | |
std::string | HexEncode (std::string_view input) | |
void | SetLogSettings (const LogSettings &settings) | |
LogSettings | GetLogSettings () | |
int | GetMinLogLevel () | |
int | GetVlogVerbosity () | |
bool | ShouldCreateLogMessage (LogSeverity severity) | |
void | KillProcess () | |
template<typename T > | ||
internal::CopyableLambda< T > | MakeCopyable (T lambda) | |
TEST (MallocMapping, EmptyContructor) | ||
TEST (MallocMapping, NotEmptyContructor) | ||
TEST (MallocMapping, MoveConstructor) | ||
TEST (MallocMapping, Copy) | ||
TEST (MallocMapping, Release) | ||
TEST (MallocMapping, IsDontNeedSafe) | ||
TEST (MallocMapping, CopySizeZero) | ||
template<typename T > | ||
RefPtr< T > | AdoptRef (T *ptr) | |
template<typename T > | ||
RefPtr< T > | Ref (T *ptr) | |
template<typename T , typename... Args> | ||
RefPtr< T > | MakeRefCounted (Args &&... args) | |
void | InitCPUInfo (size_t cpu_count) | |
bool | SetUpCPUTracker () | |
std::optional< size_t > | AndroidEfficiencyCoreCount () | |
Android specific implementation of EfficiencyCoreCount. More... | ||
bool | AndroidRequestAffinity (CpuAffinity affinity) | |
Android specific implementation of RequestAffinity. More... | ||
static ALooper * | AcquireLooperForThread () | |
bool | IsPlatformVersionAtLeast (size_t major, size_t minor=0, size_t patch=0) | |
template<class C > | ||
void | swap (scoped_nsprotocol< C > &p1, scoped_nsprotocol< C > &p2) | |
template<class C > | ||
bool | operator== (C p1, const scoped_nsprotocol< C > &p2) | |
template<class C > | ||
bool | operator!= (C p1, const scoped_nsprotocol< C > &p2) | |
NSRange | RangeForCharacterAtIndex (NSString *text, NSUInteger index) | |
NSRange | RangeForCharactersInRange (NSString *text, NSRange range) | |
bool | operator== (NST p1, const WeakNSProtocol< NST > &p2) | |
bool | operator!= (NST p1, const WeakNSProtocol< NST > &p2) | |
void | ExecuteAfterTaskObservers () | |
void | CurrentMessageLoopAddAfterTaskObserver (intptr_t key, fit::closure observer) | |
void | CurrentMessageLoopRemoveAfterTaskObserver (intptr_t key) | |
bool | TimerRearm (int fd, fml::TimePoint time_point) | |
Rearms the timer to expire at the given time point. More... | ||
bool | TimerDrain (int fd) | |
static int | ToPosixAccessFlags (FilePermission permission) | |
static int | ToPosixCreateModeFlags (FilePermission permission) | |
static int | ToPosixProtectionFlags (std::initializer_list< FileMapping::Protection > protection_flags) | |
static bool | IsWritable (std::initializer_list< FileMapping::Protection > protection_flags) | |
char * | strdup (const char *str1) | |
int | GetCurrentProcId () | |
std::string | GetLastErrorMessage () | |
static std::string | GetFullHandlePath (const fml::UniqueFD &handle) | |
static bool | IsAbsolutePath (const char *path) | |
static std::string | GetAbsolutePath (const fml::UniqueFD &base_directory, const char *subpath) | |
static std::wstring | GetTemporaryDirectoryPath () | |
static DWORD | GetDesiredAccessFlags (FilePermission permission) | |
static DWORD | GetShareFlags (FilePermission permission) | |
static DWORD | GetFileAttributesForUtf8Path (const char *absolute_path) | |
static DWORD | GetFileAttributesForUtf8Path (const fml::UniqueFD &base_directory, const char *path) | |
static bool | IsWritable (std::initializer_list< FileMapping::Protection > protection_flags) | |
static bool | IsExecutable (std::initializer_list< FileMapping::Protection > protection_flags) | |
std::string | WideStringToUtf8 (const std::wstring_view str) | |
std::wstring | Utf8ToWideString (const std::string_view str) | |
std::u16string | WideStringToUtf16 (const std::wstring_view str) | |
std::wstring | Utf16ToWideString (const std::u16string_view str) | |
template<typename T , std::size_t N> | ||
constexpr std::size_t | size (T(&array)[N]) | |
std::string | Join (const std::vector< std::string > &vec, const char *delim) | |
std::string | Utf16ToUtf8 (const std::u16string_view string) | |
std::u16string | Utf8ToUtf16 (const std::string_view string) | |
TEST (CountDownLatchTest, CanWaitOnZero) | ||
TEST (CountDownLatchTest, CanWait) | ||
template<typename ConditionFn > | ||
bool | WaitWithTimeoutImpl (std::unique_lock< std::mutex > *locker, std::condition_variable *cv, ConditionFn condition, TimeDelta timeout) | |
void | SetThreadName (const std::string &name) | |
fml::TimePoint | ChronoTicksSinceEpoch () | |
template<typename T > | ||
Milliseconds | RefreshRateToFrameBudget (T refresh_rate) | |
template<typename Clock , typename Duration > | ||
static int64_t | NanosSinceEpoch (std::chrono::time_point< Clock, Duration > time_point) | |
template<class T , class Traits > | ||
void | swap (const UniqueObject< T, Traits > &a, const UniqueObject< T, Traits > &b) | |
template<class T , class Traits > | ||
bool | operator== (const T &value, const UniqueObject< T, Traits > &object) | |
template<class T , class Traits > | ||
bool | operator!= (const T &value, const UniqueObject< T, Traits > &object) | |
Variables | |
static std::string | kKUnknownFrameName = "Unknown" |
static size_t | kKnownSignalHandlers [] |
static std::string | kKUnknownFrameName = "Unknown" |
static constexpr char | kEncoding [] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567" |
static constexpr signed char | kDecodeMap [] |
static constexpr int | kDecodeMapSize |
template<typename T > | |
constexpr bool | kIsByteSwappableV = IsByteSwappable<T>::value |
static constexpr char | kEncoding [] = "0123456789abcdef" |
constexpr LogSeverity | kLogInfo = 0 |
constexpr LogSeverity | kLogWarning = 1 |
constexpr LogSeverity | kLogError = 2 |
constexpr LogSeverity | kLogImportant = 3 |
constexpr LogSeverity | kLogFatal = 4 |
constexpr LogSeverity | kLogNumSeverities = 5 |
constexpr LogSeverity | LOG_INFO = kLogInfo |
constexpr LogSeverity | LOG_WARNING = kLogWarning |
constexpr LogSeverity | LOG_ERROR = kLogError |
constexpr LogSeverity | LOG_IMPORTANT = kLogImportant |
constexpr LogSeverity | LOG_FATAL = kLogFatal |
const LogSeverity | kLogDFatal = kLogFatal |
const LogSeverity | LOG_DFATAL = kLogDFatal |
static thread_local std::unique_ptr< MessageLoop > | tls_message_loop |
static thread_local std::unique_ptr< TaskSourceGradeHolder > | tls_task_source_grade |
static const TaskQueueId | kUnmerged = TaskQueueId(TaskQueueId::kUnmerged) |
std::once_flag | gCPUTrackerFlag |
static CPUSpeedTracker * | gCPUTracker |
static constexpr int | kClockType = CLOCK_MONOTONIC |
static constexpr CFTimeInterval | kDistantFuture = 1.0e10 |
thread_local std::map< intptr_t, fit::closure > | tTaskObservers |
static constexpr int | kClockType = CLOCK_MONOTONIC |
constexpr Milliseconds | kDefaultFrameBudget = Milliseconds(1s) / 60 |
using fml::Base32DecodeConverter = typedef BitConverter<5, 8, 16> |
using fml::Base32EncodeConverter = typedef BitConverter<8, 5, 16> |
using fml::closure = typedef std::function<void()> |
using fml::DelayedTaskQueue = typedef std::priority_queue<DelayedTask, std::deque<DelayedTask>, std::greater<DelayedTask> > |
Definition at line 42 of file delayed_task.h.
using fml::FileVisitor = typedef std::function<bool(const fml::UniqueFD& directory, const std::string& filename)> |
Signature of a callback on a file in directory
with filename
(relative to directory
). The returned bool should be false if and only if further traversal should be stopped. For example, a file-search visitor may return false when the file is found so no more visiting is needed.
typedef int fml::LogSeverity |
Definition at line 11 of file log_level.h.
using fml::Milliseconds = typedef std::chrono::duration<double, std::milli> |
Definition at line 18 of file time_delta.h.
typedef void* fml::RasterThreadMergerId |
Definition at line 19 of file shared_thread_merger.h.
using fml::ScopedBlock = typedef ScopedTypeRef<B, internal::ScopedBlockTraits<B> > |
Definition at line 41 of file scoped_block.h.
typedef std::function<void()> fml::ThreadFunction |
typedef AsciiTrie::TrieNode fml::TrieNode |
Definition at line 10 of file ascii_trie.cc.
Definition at line 11 of file ascii_trie.cc.
using fml::UniqueDir = typedef UniqueObject<DIR*, internal::os_unix::UniqueDirTraits> |
Definition at line 101 of file unique_fd.h.
using fml::UniqueFD = typedef UniqueObject<int, internal::os_unix::UniqueFDTraits> |
Definition at line 100 of file unique_fd.h.
using fml::Utf16StringConverter = typedef std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> |
Definition at line 23 of file string_conversion.cc.
using fml::WideStringConverter = typedef std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t> |
Definition at line 13 of file wstring_conversion.cc.
|
strong |
The CPU Affinity provides a hint to the operating system on which cores a particular thread should be scheduled on. The operating system may or may not honor these requests.
Enumerator | |
---|---|
kPerformance | Request CPU affinity for the performance cores. Generally speaking, only the UI and Raster thread should use this option. |
kEfficiency | Request CPU affinity for the efficiency cores. |
kNotPerformance | Request affinity for all non-performance cores. |
Definition at line 17 of file cpu_affinity.h.
|
strong |
Enumerator | |
---|---|
kRead | |
kWrite | |
kReadWrite |
|
strong |
Enumerator | |
---|---|
kSingle | |
kAll |
Definition at line 55 of file message_loop_task_queues.h.
|
strong |
Enumerator | |
---|---|
kRemainsMerged | |
kRemainsUnmerged | |
kUnmergedNow |
Definition at line 20 of file raster_thread_merger.h.
|
strong |
Definition at line 12 of file status.h.
|
strong |
Categories of work dispatched to MessageLoopTaskQueues
dispatcher. By specifying the TaskSourceGrade
, you indicate the task's importance to the dispatcher.
Definition at line 15 of file task_source_grade.h.
|
static |
Definition at line 16 of file message_loop_android.cc.
std::optional< size_t > fml::AndroidEfficiencyCoreCount | ( | ) |
Android specific implementation of EfficiencyCoreCount.
Definition at line 50 of file cpu_affinity.cc.
bool fml::AndroidRequestAffinity | ( | CpuAffinity | affinity | ) |
Android specific implementation of RequestAffinity.
Definition at line 59 of file cpu_affinity.cc.
Definition at line 35 of file backtrace.cc.
std::string fml::BacktraceHere | ( | size_t | offset = 0 | ) |
Definition at line 43 of file backtrace.cc.
std::pair< bool, std::string > fml::Base32Decode | ( | const std::string & | input | ) |
Definition at line 55 of file base32.cc.
std::pair< bool, std::string > fml::Base32Encode | ( | std::string_view | input | ) |
|
constexpr |
Convert a known big endian value to match the endianness of the current architecture. This is effectively a cross platform ntohl/ntohs (as network byte order is always Big Endian). The given value must be an integral type of size 1, 2, 4, or 8.
Definition at line 59 of file endianness.h.
|
constexpr |
Flips the endianness of the given value. The given value must be an integral type of size 1, 2, 4, or 8.
Definition at line 40 of file endianness.h.
fml::TimePoint fml::ChronoTicksSinceEpoch | ( | ) |
Definition at line 21 of file chrono_timestamp_provider.cc.
|
inline |
Definition at line 233 of file command_line.h.
|
inline |
Definition at line 254 of file command_line.h.
|
inline |
Definition at line 204 of file command_line.h.
|
inline |
Definition at line 182 of file command_line.h.
|
inline |
Definition at line 214 of file command_line.h.
std::optional< CommandLine > fml::CommandLineFromPlatform | ( | ) |
Definition at line 9 of file command_line_posix.cc.
|
inline |
Definition at line 242 of file command_line.h.
std::vector< std::string > fml::CommandLineToArgv | ( | const CommandLine & | command_line | ) |
Definition at line 141 of file command_line.cc.
fml::UniqueFD fml::CreateDirectory | ( | const fml::UniqueFD & | base_directory, |
const std::vector< std::string > & | components, | ||
FilePermission | permission | ||
) |
|
static |
Definition at line 12 of file file.cc.
std::string fml::CreateTemporaryDirectory | ( | ) |
Definition at line 25 of file file_posix.cc.
void fml::CurrentMessageLoopAddAfterTaskObserver | ( | intptr_t | key, |
fit::closure | observer | ||
) |
Definition at line 19 of file task_observers.cc.
void fml::CurrentMessageLoopRemoveAfterTaskObserver | ( | intptr_t | key | ) |
Definition at line 26 of file task_observers.cc.
fml::UniqueFD fml::Duplicate | ( | fml::UniqueFD::element_type | descriptor | ) |
Definition at line 123 of file file_posix.cc.
std::optional< size_t > fml::EfficiencyCoreCount | ( | ) |
Request count of efficiency cores.
Efficiency cores are defined as those with the lowest reported cpu_max_freq. If the CPU speed could not be determined, or if all cores have the same reported speed then this returns std::nullopt. That is, the result will never be 0.
Definition at line 18 of file cpu_affinity.cc.
void fml::erase_if | ( | Collection & | container, |
std::function< bool(typename Collection::iterator)> | predicate | ||
) |
Definition at line 16 of file container.h.
void fml::ExecuteAfterTaskObservers | ( | ) |
Definition at line 13 of file task_observers.cc.
bool fml::FileExists | ( | const fml::UniqueFD & | base_directory, |
const char * | path | ||
) |
Definition at line 183 of file file_posix.cc.
|
static |
Definition at line 50 of file file_win.cc.
int fml::GetCurrentProcId | ( | ) |
Definition at line 9 of file process_posix.cc.
|
static |
Definition at line 73 of file file_win.cc.
|
static |
Definition at line 97 of file file_win.cc.
|
static |
Definition at line 101 of file file_win.cc.
|
static |
Definition at line 27 of file file_win.cc.
std::string fml::GetLastErrorMessage | ( | ) |
Definition at line 15 of file errors_win.cc.
LogSettings fml::GetLogSettings | ( | ) |
Definition at line 32 of file log_settings.cc.
int fml::GetMinLogLevel | ( | ) |
Definition at line 36 of file log_settings.cc.
|
static |
Definition at line 85 of file file_win.cc.
|
static |
Definition at line 27 of file backtrace.cc.
|
static |
Definition at line 64 of file file_win.cc.
int fml::GetVlogVerbosity | ( | ) |
Definition at line 212 of file logging.cc.
|
constexpr |
Definition at line 25 of file hash_combine.h.
|
constexpr |
Definition at line 30 of file hash_combine.h.
|
constexpr |
Definition at line 13 of file hash_combine.h.
|
constexpr |
Definition at line 18 of file hash_combine.h.
std::string fml::HexEncode | ( | std::string_view | input | ) |
Definition at line 14 of file hex_codec.cc.
void fml::InitCPUInfo | ( | size_t | cpu_count | ) |
Definition at line 26 of file cpu_affinity.cc.
void fml::InstallCrashHandler | ( | ) |
Definition at line 126 of file backtrace.cc.
|
static |
Definition at line 37 of file file_win.cc.
bool fml::IsCrashHandlingSupported | ( | ) |
Definition at line 140 of file backtrace.cc.
bool fml::IsDirectory | ( | const fml::UniqueFD & | base_directory, |
const char * | path | ||
) |
Definition at line 141 of file file_posix.cc.
bool fml::IsDirectory | ( | const fml::UniqueFD & | directory | ) |
Definition at line 127 of file file_posix.cc.
|
static |
Definition at line 33 of file mapping_win.cc.
bool fml::IsFile | ( | const std::string & | path | ) |
Definition at line 146 of file file_posix.cc.
bool fml::IsPlatformVersionAtLeast | ( | size_t | major, |
size_t | minor = 0 , |
||
size_t | patch = 0 |
||
) |
Definition at line 11 of file platform_version.mm.
|
static |
Definition at line 39 of file mapping_posix.cc.
|
static |
Definition at line 23 of file mapping_win.cc.
std::string fml::Join | ( | const std::vector< std::string > & | vec, |
const char * | delim | ||
) |
void fml::KillProcess | ( | ) |
Definition at line 220 of file logging.cc.
|
constexpr |
Convert a known little endian value to match the endianness of the current architecture. The given value must be an integral type of size 1, 2, 4, or 8.
Definition at line 71 of file endianness.h.
internal::CopyableLambda< T > fml::MakeCopyable | ( | T | lambda | ) |
Definition at line 57 of file make_copyable.h.
|
static |
Definition at line 39 of file time_point.cc.
fml::UniqueFD fml::OpenDirectory | ( | const char * | path, |
bool | create_if_necessary, | ||
FilePermission | permission | ||
) |
Definition at line 97 of file file_posix.cc.
fml::UniqueFD fml::OpenDirectory | ( | const fml::UniqueFD & | base_directory, |
const char * | path, | ||
bool | create_if_necessary, | ||
FilePermission | permission | ||
) |
Definition at line 104 of file file_posix.cc.
fml::UniqueFD fml::OpenDirectoryReadOnly | ( | const fml::UniqueFD & | base_directory, |
const char * | path | ||
) |
Helper method that calls OpenDirectory
with create_if_necessary = false and permission = kRead.
fml::UniqueFD fml::OpenFile | ( | const char * | path, |
bool | create_if_necessary, | ||
FilePermission | permission | ||
) |
This can open a directory on POSIX, but not on Windows.
Definition at line 66 of file file_posix.cc.
fml::UniqueFD fml::OpenFile | ( | const fml::UniqueFD & | base_directory, |
const char * | path, | ||
bool | create_if_necessary, | ||
FilePermission | permission | ||
) |
This can open a directory on POSIX, but not on Windows.
Definition at line 73 of file file_posix.cc.
fml::UniqueFD fml::OpenFileReadOnly | ( | const fml::UniqueFD & | base_directory, |
const char * | path | ||
) |
Helper method that calls OpenFile
with create_if_necessary = false and permission = kRead.
This can open a directory on POSIX, but not on Windows.
bool fml::operator!= | ( | C | p1, |
const scoped_nsprotocol< C > & | p2 | ||
) |
Definition at line 147 of file scoped_nsobject.h.
bool fml::operator!= | ( | const T & | value, |
const UniqueObject< T, Traits > & | object | ||
) |
Definition at line 131 of file unique_object.h.
bool fml::operator!= | ( | NST | p1, |
const WeakNSProtocol< NST > & | p2 | ||
) |
Definition at line 188 of file weak_nsobject.h.
bool fml::operator== | ( | C | p1, |
const scoped_nsprotocol< C > & | p2 | ||
) |
Definition at line 142 of file scoped_nsobject.h.
bool fml::operator== | ( | const T & | value, |
const UniqueObject< T, Traits > & | object | ||
) |
Definition at line 126 of file unique_object.h.
bool fml::operator== | ( | NST | p1, |
const WeakNSProtocol< NST > & | p2 | ||
) |
Definition at line 183 of file weak_nsobject.h.
NSRange fml::RangeForCharacterAtIndex | ( | NSString * | text, |
NSUInteger | index | ||
) |
Definition at line 9 of file string_range_sanitization.mm.
NSRange fml::RangeForCharactersInRange | ( | NSString * | text, |
NSRange | range | ||
) |
Definition at line 19 of file string_range_sanitization.mm.
std::optional< int64_t > fml::ReadIntFromFile | ( | const std::string & | path | ) |
Definition at line 86 of file cpu_affinity.cc.
Milliseconds fml::RefreshRateToFrameBudget | ( | T | refresh_rate | ) |
Definition at line 24 of file time_delta.h.
bool fml::RemoveDirectoryRecursively | ( | const fml::UniqueFD & | parent, |
const char * | directory_name | ||
) |
Helper method to recursively remove files and subdirectories inside the directory. The directory itself will also be removed.
Return true if and only if all files have been successfully removed.
Definition at line 120 of file file.cc.
bool fml::RemoveFilesInDirectory | ( | const fml::UniqueFD & | directory | ) |
Helper method to recursively remove files and subdirectories inside the directory. The directory itself will not be removed.
Return true if and only if all files have been successfully removed.
Definition at line 102 of file file.cc.
bool fml::RequestAffinity | ( | CpuAffinity | affinity | ) |
Request the given affinity for the current thread.
Returns true if successfull, or if it was a no-op. This function is only supported on Android devices. Affinity requests are based on documented CPU speed. This speed data is parsed from cpuinfo_max_freq files, see also: https://www.kernel.org/doc/Documentation/cpu-freq/user-guide.txt
Definition at line 26 of file cpu_affinity.cc.
void fml::SetLogSettings | ( | const LogSettings & | settings | ) |
Definition at line 26 of file log_settings.cc.
void fml::SetThreadName | ( | const std::string & | name | ) |
Definition at line 104 of file thread.cc.
bool fml::SetUpCPUTracker | ( | ) |
Definition at line 40 of file cpu_affinity.cc.
bool fml::ShouldCreateLogMessage | ( | LogSeverity | severity | ) |
Definition at line 216 of file logging.cc.
|
static |
Definition at line 101 of file backtrace.cc.
|
static |
Definition at line 75 of file backtrace.cc.
char * fml::strdup | ( | const char * | str1 | ) |
Definition at line 11 of file posix_wrappers_posix.cc.
void fml::swap | ( | const UniqueObject< T, Traits > & | a, |
const UniqueObject< T, Traits > & | b | ||
) |
Definition at line 121 of file unique_object.h.
void fml::swap | ( | scoped_nsprotocol< C > & | p1, |
scoped_nsprotocol< C > & | p2 | ||
) |
Definition at line 137 of file scoped_nsobject.h.
fml::TEST | ( | CountDownLatchTest | , |
CanWait | |||
) |
Definition at line 21 of file count_down_latch_unittests.cc.
fml::TEST | ( | CountDownLatchTest | , |
CanWaitOnZero | |||
) |
Definition at line 16 of file count_down_latch_unittests.cc.
fml::TEST | ( | MallocMapping | , |
Copy | |||
) |
Definition at line 36 of file mapping_unittests.cc.
fml::TEST | ( | MallocMapping | , |
CopySizeZero | |||
) |
Definition at line 64 of file mapping_unittests.cc.
fml::TEST | ( | MallocMapping | , |
EmptyContructor | |||
) |
Definition at line 10 of file mapping_unittests.cc.
fml::TEST | ( | MallocMapping | , |
IsDontNeedSafe | |||
) |
Definition at line 57 of file mapping_unittests.cc.
fml::TEST | ( | MallocMapping | , |
MoveConstructor | |||
) |
Definition at line 23 of file mapping_unittests.cc.
fml::TEST | ( | MallocMapping | , |
NotEmptyContructor | |||
) |
Definition at line 16 of file mapping_unittests.cc.
fml::TEST | ( | MallocMapping | , |
Release | |||
) |
Definition at line 49 of file mapping_unittests.cc.
bool fml::TimerDrain | ( | int | fd | ) |
Drains the timer FD and returns true if it has expired. This may be false in case the timer read is non-blocking and this routine was called before the timer expiry.
Definition at line 59 of file timerfd.cc.
bool fml::TimerRearm | ( | int | fd, |
fml::TimePoint | time_point | ||
) |
Rearms the timer to expire at the given time point.
Definition at line 38 of file timerfd.cc.
|
static |
Definition at line 115 of file backtrace.cc.
|
static |
Definition at line 34 of file file_posix.cc.
|
static |
Definition at line 50 of file file_posix.cc.
|
static |
Definition at line 20 of file mapping_posix.cc.
bool fml::TruncateFile | ( | const fml::UniqueFD & | file, |
size_t | size | ||
) |
Definition at line 155 of file file_posix.cc.
bool fml::UnlinkDirectory | ( | const char * | path | ) |
Definition at line 163 of file file_posix.cc.
bool fml::UnlinkDirectory | ( | const fml::UniqueFD & | base_directory, |
const char * | path | ||
) |
Definition at line 167 of file file_posix.cc.
bool fml::UnlinkFile | ( | const char * | path | ) |
Definition at line 171 of file file_posix.cc.
bool fml::UnlinkFile | ( | const fml::UniqueFD & | base_directory, |
const char * | path | ||
) |
Definition at line 175 of file file_posix.cc.
std::string fml::Utf16ToUtf8 | ( | const std::u16string_view | string | ) |
Definition at line 37 of file string_conversion.cc.
std::wstring fml::Utf16ToWideString | ( | const std::u16string_view | str | ) |
Definition at line 32 of file wstring_conversion.cc.
std::u16string fml::Utf8ToUtf16 | ( | const std::string_view | string | ) |
Definition at line 42 of file string_conversion.cc.
std::wstring fml::Utf8ToWideString | ( | const std::string_view | str | ) |
Definition at line 21 of file wstring_conversion.cc.
bool fml::VisitFiles | ( | const fml::UniqueFD & | directory, |
const FileVisitor & | visitor | ||
) |
Call visitor
on all files inside the directory
non-recursively. The trivial file "." and ".." will not be visited.
Return false if and only if the visitor returns false during the traversal.
If recursive visiting is needed, call VisitFiles
inside the visitor
, or use our helper method VisitFilesRecursively
.
VisitFilesRecursively
. Definition at line 236 of file file_posix.cc.
bool fml::VisitFilesRecursively | ( | const fml::UniqueFD & | directory, |
const FileVisitor & | visitor | ||
) |
Recursively call visitor
on all files inside the directory
. Return false if and only if the visitor returns false during the traversal.
This is a helper method that wraps the general VisitFiles
method. The VisitFiles
is strictly more powerful as it has the access of the recursion stack to the file. For example, VisitFiles
may be able to maintain a vector of directory names that lead to a file. That could be useful to compute the relative path between the root directory and the visited file.
VisitFiles
. Definition at line 71 of file file.cc.
bool fml::WaitWithTimeoutImpl | ( | std::unique_lock< std::mutex > * | locker, |
std::condition_variable * | cv, | ||
ConditionFn | condition, | ||
TimeDelta | timeout | ||
) |
Definition at line 20 of file waitable_event.cc.
std::u16string fml::WideStringToUtf16 | ( | const std::wstring_view | str | ) |
Definition at line 26 of file wstring_conversion.cc.
std::string fml::WideStringToUtf8 | ( | const std::wstring_view | str | ) |
Definition at line 16 of file wstring_conversion.cc.
bool fml::WriteAtomically | ( | const fml::UniqueFD & | base_directory, |
const char * | file_name, | ||
const Mapping & | mapping | ||
) |
Definition at line 191 of file file_posix.cc.
|
static |
Definition at line 21 of file cpu_affinity.cc.
std::once_flag fml::gCPUTrackerFlag |
The CPUSpeedTracker is initialized once the first time a thread affinity is requested.
Definition at line 20 of file cpu_affinity.cc.
|
staticconstexpr |
Definition at line 14 of file message_loop_android.cc.
|
staticconstexpr |
Definition at line 15 of file message_loop_linux.cc.
|
staticconstexpr |
|
staticconstexpr |
|
constexpr |
Definition at line 21 of file time_delta.h.
|
staticconstexpr |
Definition at line 14 of file message_loop_darwin.mm.
|
staticconstexpr |
|
staticconstexpr |
Definition at line 12 of file hex_codec.cc.
|
constexpr |
Definition at line 35 of file endianness.h.
|
static |
Definition at line 62 of file backtrace.cc.
|
static |
Definition at line 25 of file backtrace.cc.
|
static |
Definition at line 9 of file backtrace_stub.cc.
const LogSeverity fml::kLogDFatal = kLogFatal |
Definition at line 58 of file log_level.h.
|
constexpr |
Definition at line 15 of file log_level.h.
|
constexpr |
Definition at line 19 of file log_level.h.
|
constexpr |
Definition at line 18 of file log_level.h.
|
constexpr |
Definition at line 13 of file log_level.h.
|
constexpr |
Definition at line 20 of file log_level.h.
|
constexpr |
Definition at line 14 of file log_level.h.
|
static |
Definition at line 25 of file message_loop_task_queues.h.
const LogSeverity fml::LOG_DFATAL = kLogDFatal |
Definition at line 64 of file log_level.h.
|
constexpr |
Definition at line 35 of file log_level.h.
|
constexpr |
Definition at line 45 of file log_level.h.
|
constexpr |
Definition at line 40 of file log_level.h.
|
constexpr |
Definition at line 25 of file log_level.h.
|
constexpr |
Definition at line 30 of file log_level.h.
|
static |
Definition at line 17 of file message_loop.cc.
|
static |
Definition at line 35 of file message_loop_task_queues.cc.
thread_local std::map<intptr_t, fit::closure> fml::tTaskObservers |
Definition at line 11 of file task_observers.cc.