A wrapper for ASurfaceControl. https://developer.android.com/ndk/reference/group/native-activity#asurfacecontrol. More...
#include <surface_control.h>
Public Member Functions | |
| virtual | ~SurfaceControl ()=default |
| Removes the surface control from the presentation hierarchy managed by the system compositor and release the client side reference to the control. At this point, it may be collected when the compositor is also done using it. | |
| virtual bool | IsValid () const =0 |
| virtual ASurfaceControl * | GetHandle () const =0 |
| virtual bool | RemoveFromParent () const =0 |
| Remove the surface control from the hierarchy of nodes presented by the system compositor. | |
Static Public Member Functions | |
| static bool | IsAvailableOnPlatform () |
| static std::unique_ptr< SurfaceControl > | Create (ANativeWindow *window, const char *debug_name=nullptr) |
| Creates a new surface control and adds it as a child of the given window. | |
A wrapper for ASurfaceControl. https://developer.android.com/ndk/reference/group/native-activity#asurfacecontrol.
Instances of this class represent a node in the hierarchy of surfaces sent to the system compositor for final composition.
This wrapper is only available on Android API 29 and above.
Definition at line 23 of file surface_control.h.
|
virtualdefault |
Removes the surface control from the presentation hierarchy managed by the system compositor and release the client side reference to the control. At this point, it may be collected when the compositor is also done using it.
|
static |
Creates a new surface control and adds it as a child of the given window.
| window | The window | |
| [in] | debug_name | A debug name. See it using adb shell dumpsys SurfaceFlinger along with other control properties. If no debug name is specified, the value "Impeller Layer" is used. |
Definition at line 13 of file surface_control.cc.
References window.
|
pure virtual |
Implemented in impeller::android::testing::FakeSurfaceControl, and impeller::android::SurfaceControlImpl.
Referenced by impeller::android::CreatePreviousReleaseFence(), impeller::android::SurfaceTransaction::SetBackgroundColor(), impeller::android::SurfaceTransaction::SetContents(), and impeller::android::SurfaceTransaction::SetParent().
|
static |
true if any surface controls can be created on this platform. Definition at line 19 of file surface_control.cc.
References impeller::android::GetProcTable(), and impeller::android::ProcTable::IsValid().
Referenced by impeller::AHBSwapchainVK::IsAvailableOnPlatform(), and impeller::android::testing::TEST().
|
pure virtual |
|
pure virtual |
Remove the surface control from the hierarchy of nodes presented by the system compositor.
This is called implicitly when the surface control is collected.
true If the control will be removed from the hierarchy of nodes presented by the system compositor. Implemented in impeller::android::testing::FakeSurfaceControl, and impeller::android::SurfaceControlImpl.