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"
25 ASurfaceTransaction*
tx =
nullptr;
32 return other.
tx ==
tx;
36 return !(*
this == other);
90 fml::UniqueFD acquire_fence = {});
142 struct UniqueASurfaceTransactionTraits {
145 static bool IsValid(
const WrappedSurfaceTransaction&
value) {
146 return value.tx !=
nullptr;
149 static void Free(
const WrappedSurfaceTransaction&
value) {
156 fml::UniqueObject<WrappedSurfaceTransaction, UniqueASurfaceTransactionTraits>
A wrapper for AHardwareBuffer https://developer.android.com/ndk/reference/group/a-hardware-buffer.
A wrapper for ASurfaceControl. https://developer.android.com/ndk/reference/group/native-activity#asur...
A wrapper for ASurfaceTransaction. https://developer.android.com/ndk/reference/group/native-activity#...
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....
std::function< void(ASurfaceTransactionStats *)> OnCompleteCallback
SurfaceTransaction & operator=(const SurfaceTransaction &)=delete
SurfaceTransaction(const SurfaceTransaction &)=delete
bool Apply(OnCompleteCallback callback=nullptr)
Applies the updated encoded in the transaction and invokes the callback when the updated are complete...
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...
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...
static bool IsAvailableOnPlatform()
const ProcTable & GetProcTable()
A wrapper class that indicates whether a SurfaceTransaction was created by the flutter engine or was ...
constexpr bool operator==(const WrappedSurfaceTransaction &other) const
constexpr bool operator!=(const WrappedSurfaceTransaction &other) const