 |
Flutter Impeller
|
|
Go to the documentation of this file.
5 #ifndef FLUTTER_IMPELLER_TOOLKIT_ANDROID_SURFACE_TRANSACTION_H_
6 #define FLUTTER_IMPELLER_TOOLKIT_ANDROID_SURFACE_TRANSACTION_H_
11 #include "flutter/fml/unique_fd.h"
12 #include "flutter/fml/unique_object.h"
69 fml::UniqueFD acquire_fence = {});
121 struct UniqueASurfaceTransactionTraits {
122 static ASurfaceTransaction* InvalidValue() {
return nullptr; }
124 static bool IsValid(ASurfaceTransaction* value) {
125 return value != InvalidValue();
128 static void Free(ASurfaceTransaction* value) {
133 fml::UniqueObject<ASurfaceTransaction*, UniqueASurfaceTransactionTraits>
139 #endif // FLUTTER_IMPELLER_TOOLKIT_ANDROID_SURFACE_TRANSACTION_H_
bool SetParent(const SurfaceControl &control, const SurfaceControl *new_parent=nullptr)
Set the new parent control of the given control. If the new parent is null, it is removed from the co...
std::function< void(ASurfaceTransactionStats *)> OnCompleteCallback
A wrapper for ASurfaceTransaction. https://developer.android.com/ndk/reference/group/native-activity#...
A wrapper for ASurfaceControl. https://developer.android.com/ndk/reference/group/native-activity#asur...
bool SetBackgroundColor(const SurfaceControl &control, const Color &color)
Encodes the updated background color of the surface control. The update will not be committed till th...
A wrapper for AHardwareBuffer https://developer.android.com/ndk/reference/group/a-hardware-buffer.
bool Apply(OnCompleteCallback callback=nullptr)
Applies the updated encoded in the transaction and invokes the callback when the updated are complete...
const ProcTable & GetProcTable()
SurfaceTransaction & operator=(const SurfaceTransaction &)=delete
static bool IsAvailableOnPlatform()
bool SetContents(const SurfaceControl *control, const HardwareBuffer *buffer, fml::UniqueFD acquire_fence={})
Encodes that the updated contents of a surface control are specified by the given hardware buffer....