| Flutter Impeller |

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
ProcTable & | operator= (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. More...
bool | TraceIsEnabled () const
| Check if tracing in enabled in the process. This call can be made at any API level. More...
| FOR_EACH_ANDROID_PROC (DEFINE_PROC)

## Detailed Description

The table of Android procs that are resolved dynamically.

Definition at line 93 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_);
47 FOR_EACH_ANDROID_PROC(RESOLVE_PROC);
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 }
RESOLVE_PROC
#define RESOLVE_PROC(proc, api)
impeller::interop::Create
ScopedObject< Object > Create(CtorArgs &&... args)
Definition: object.h:160
impeller::android::ProcTable::FOR_EACH_ANDROID_PROC
FOR_EACH_ANDROID_PROC(DEFINE_PROC)
VALIDATION_LOG
#define VALIDATION_LOG
Definition: validation.h:91

References impeller::interop::Create(), FOR_EACH_ANDROID_PROC(), RESOLVE_PROC, and VALIDATION_LOG.

## ◆ ~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 |  | ) |

Referenced by ProcTable().

## ◆ 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 }

Referenced by impeller::android::HardwareBuffer::IsAvailableOnPlatform(), impeller::android::SurfaceControl::IsAvailableOnPlatform(), impeller::android::SurfaceTransaction::IsAvailableOnPlatform(), and impeller::android::testing::TEST().

## ◆ 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:

- impeller/toolkit/android/proc_table.h
- impeller/toolkit/android/proc_table.cc