Holds state that is shared across Android surfaces. More...
#include <android_context.h>
Classes | |
| struct | ContextSettings |
Public Member Functions | |
| AndroidContext (AndroidRenderingAPI rendering_api) | |
| virtual | ~AndroidContext () |
| virtual AndroidRenderingAPI | RenderingApi () const |
| virtual bool | IsDynamicSelection () const |
| virtual bool | IsValid () const |
| void | SetMainSkiaContext (const sk_sp< GrDirectContext > &main_context) |
| Setter for the Skia context to be used by subsequent AndroidSurfaces. | |
| sk_sp< GrDirectContext > | GetMainSkiaContext () const |
| Accessor for the Skia context associated with AndroidSurfaces and the raster thread. | |
| virtual std::shared_ptr< impeller::Context > | GetImpellerContext () const |
| Accessor for the Impeller context associated with AndroidSurfaces and the raster thread. | |
| virtual void | SetupImpellerContext () |
| Perform deferred setup for the impeller Context. | |
Protected Member Functions | |
| void | SetImpellerContext (const std::shared_ptr< impeller::Context > &impeller_context) |
Holds state that is shared across Android surfaces.
Definition at line 26 of file android_context.h.
|
explicit |
Definition at line 9 of file android_context.cc.
|
virtual |
Definition at line 12 of file android_context.cc.
|
virtual |
Accessor for the Impeller context associated with AndroidSurfaces and the raster thread.
Reimplemented in flutter::AndroidContextDynamicImpeller.
Definition at line 49 of file android_context.cc.
| sk_sp< GrDirectContext > flutter::AndroidContext::GetMainSkiaContext | ( | ) | const |
Accessor for the Skia context associated with AndroidSurfaces and the raster thread.
This context is created lazily by the AndroidSurface based on their respective rendering backend and set on this AndroidContext to share via SetMainSkiaContext.
nullptr when no Skia context has been set yet by its AndroidSurface via SetMainSkiaContext. Definition at line 36 of file android_context.cc.
Referenced by flutter::AndroidContextGLSkia::~AndroidContextGLSkia().
|
virtual |
Reimplemented in flutter::AndroidContextDynamicImpeller.
Definition at line 53 of file android_context.cc.
|
virtual |
Reimplemented in flutter::AndroidContextDynamicImpeller, flutter::AndroidContextGLImpeller, flutter::AndroidContextGLSkia, and flutter::AndroidContextVKImpeller.
Definition at line 27 of file android_context.cc.
|
virtual |
Reimplemented in flutter::AndroidContextDynamicImpeller, flutter::AndroidContextGLImpeller, and flutter::AndroidContextVKImpeller.
Definition at line 23 of file android_context.cc.
|
protected |
Definition at line 44 of file android_context.cc.
Referenced by flutter::AndroidContextGLImpeller::AndroidContextGLImpeller(), flutter::AndroidContextVKImpeller::AndroidContextVKImpeller(), and flutter::testing::android::TestAndroidContext::TestAndroidContext().
| void flutter::AndroidContext::SetMainSkiaContext | ( | const sk_sp< GrDirectContext > & | main_context | ) |
Setter for the Skia context to be used by subsequent AndroidSurfaces.
This is useful to reduce memory consumption when creating multiple AndroidSurfaces for the same AndroidContext.
The first AndroidSurface should set this for the AndroidContext if the AndroidContext does not yet have a Skia context to share via GetMainSkiaContext.
Definition at line 31 of file android_context.cc.
References NOT_SLIMPELLER.
Referenced by flutter::AndroidContextGLSkia::~AndroidContextGLSkia().
|
inlinevirtual |
Perform deferred setup for the impeller Context.
Reimplemented in flutter::AndroidContextDynamicImpeller.
Definition at line 80 of file android_context.h.