Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
 
Loading...
Searching...
No Matches
flutter::AndroidSurfaceFactoryImpl Class Reference

#include <platform_view_android.h>

Inheritance diagram for flutter::AndroidSurfaceFactoryImpl:
flutter::AndroidSurfaceFactory

Public Member Functions

 AndroidSurfaceFactoryImpl (const std::shared_ptr< AndroidContext > &context, bool enable_impeller, bool lazy_shader_mode)
 
 ~AndroidSurfaceFactoryImpl () override
 
std::unique_ptr< AndroidSurfaceCreateSurface () override
 
- Public Member Functions inherited from flutter::AndroidSurfaceFactory
 AndroidSurfaceFactory ()=default
 
virtual ~AndroidSurfaceFactory ()=default
 

Detailed Description

Definition at line 27 of file platform_view_android.h.

Constructor & Destructor Documentation

◆ AndroidSurfaceFactoryImpl()

flutter::AndroidSurfaceFactoryImpl::AndroidSurfaceFactoryImpl ( const std::shared_ptr< AndroidContext > &  context,
bool  enable_impeller,
bool  lazy_shader_mode 
)

Definition at line 66 of file platform_view_android.cc.

70 : android_context_(context),
71 enable_impeller_(enable_impeller),
72 lazy_shader_mode_(lazy_shader_mode) {}
std::shared_ptr< ContextGLES > context

◆ ~AndroidSurfaceFactoryImpl()

flutter::AndroidSurfaceFactoryImpl::~AndroidSurfaceFactoryImpl ( )
overridedefault

Member Function Documentation

◆ CreateSurface()

std::unique_ptr< AndroidSurface > flutter::AndroidSurfaceFactoryImpl::CreateSurface ( )
overridevirtual

Implements flutter::AndroidSurfaceFactory.

Definition at line 76 of file platform_view_android.cc.

76 {
77 if (android_context_->IsDynamicSelection()) {
78 auto cast_ptr = std::static_pointer_cast<AndroidContextDynamicImpeller>(
79 android_context_);
80 return std::make_unique<AndroidSurfaceDynamicImpeller>(cast_ptr);
81 }
82 switch (android_context_->RenderingApi()) {
83#if !SLIMPELLER
85 return std::make_unique<AndroidSurfaceSoftware>();
87 return std::make_unique<AndroidSurfaceGLSkia>(
88 std::static_pointer_cast<AndroidContextGLSkia>(android_context_));
89#endif // !SLIMPELLER
91 return std::make_unique<AndroidSurfaceGLImpeller>(
92 std::static_pointer_cast<AndroidContextGLImpeller>(android_context_));
94 return std::make_unique<AndroidSurfaceVKImpeller>(
95 std::static_pointer_cast<AndroidContextVKImpeller>(android_context_));
97 auto cast_ptr = std::static_pointer_cast<AndroidContextDynamicImpeller>(
98 android_context_);
99 return std::make_unique<AndroidSurfaceDynamicImpeller>(cast_ptr);
100 }
101 }
103}
#define FML_UNREACHABLE()
Definition logging.h:128

References FML_UNREACHABLE, flutter::kImpellerAutoselect, flutter::kImpellerOpenGLES, flutter::kImpellerVulkan, flutter::kSkiaOpenGLES, and flutter::kSoftware.


The documentation for this class was generated from the following files: