Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
impeller::android::ProcTable Struct Reference

The table of Android procs that are resolved dynamically. More...

#include <proc_table.h>

Public Member Functions

 ProcTable ()
 
 ~ProcTable ()
 
 ProcTable (const ProcTable &)=delete
 
ProcTableoperator= (const ProcTable &)=delete
 
bool IsValid () const
 If a valid proc table could be setup. This may fail in case of setup on non-Android platforms.
 
bool TraceIsEnabled () const
 Check if tracing in enabled in the process. This call can be made at any API level.
 
 FOR_EACH_ANDROID_PROC (DEFINE_PROC)
 

Detailed Description

The table of Android procs that are resolved dynamically.

Definition at line 90 of file proc_table.h.

Constructor & Destructor Documentation

◆ ProcTable() [1/2]

impeller::android::ProcTable::ProcTable ( )

Definition at line 34 of file proc_table.cc.

34 {
35 auto lib_android = fml::NativeLibrary::Create("libandroid.so");
36 auto lib_egl = fml::NativeLibrary::Create("libEGL.so");
37
38 if (!lib_android || !lib_egl) {
39 VALIDATION_LOG << "Could not open Android libraries.";
40 return;
41 }
42
43 libraries_.push_back(std::move(lib_android));
44 libraries_.push_back(std::move(lib_egl));
45
46#define RESOLVE_PROC(proc, api) ResolveAndroidProc(proc, libraries_);
48#undef RESOLVE_PROC
49
50 if (AChoreographer_postFrameCallback64) {
51 AChoreographer_postFrameCallback.Reset();
52 }
53
54#if FML_ARCH_CPU_32_BITS
55 // On 32-bit platforms, the nanosecond resolution timestamp causes overflow on
56 // the argument in the callback. Don't use it on those platforms.
57 AChoreographer_postFrameCallback.Reset();
58#endif // FML_ARCH_CPU_32_BITS
59
60 is_valid_ = true;
61}
static fml::RefPtr< NativeLibrary > Create(const char *path)
#define RESOLVE_PROC(proc, api)
#define FOR_EACH_ANDROID_PROC(INVOKE)
The Android procs along with the device API level on which these will be available....
Definition proc_table.h:37
#define VALIDATION_LOG
Definition validation.h:73

◆ ~ProcTable()

impeller::android::ProcTable::~ProcTable ( )
default

◆ ProcTable() [2/2]

impeller::android::ProcTable::ProcTable ( const ProcTable )
delete

Member Function Documentation

◆ FOR_EACH_ANDROID_PROC()

impeller::android::ProcTable::FOR_EACH_ANDROID_PROC ( DEFINE_PROC  )

◆ IsValid()

bool impeller::android::ProcTable::IsValid ( ) const

If a valid proc table could be setup. This may fail in case of setup on non-Android platforms.

Returns
true if valid.

Definition at line 65 of file proc_table.cc.

65 {
66 return is_valid_;
67}

◆ operator=()

ProcTable & impeller::android::ProcTable::operator= ( const ProcTable )
delete

◆ TraceIsEnabled()

bool impeller::android::ProcTable::TraceIsEnabled ( ) const

Check if tracing in enabled in the process. This call can be made at any API level.

Returns
If tracing is enabled.

Definition at line 69 of file proc_table.cc.

69 {
70 return this->ATrace_isEnabled ? this->ATrace_isEnabled() : false;
71}

The documentation for this struct was generated from the following files: