Flutter Engine
 
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 70 of file platform_view_android.cc.

74 : android_context_(context),
75 enable_impeller_(enable_impeller),
76 lazy_shader_mode_(lazy_shader_mode) {}

◆ ~AndroidSurfaceFactoryImpl()

flutter::AndroidSurfaceFactoryImpl::~AndroidSurfaceFactoryImpl ( )
overridedefault

Member Function Documentation

◆ CreateSurface()

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

Implements flutter::AndroidSurfaceFactory.

Definition at line 80 of file platform_view_android.cc.

80 {
81 if (android_context_->IsDynamicSelection()) {
82 auto cast_ptr = std::static_pointer_cast<AndroidContextDynamicImpeller>(
83 android_context_);
84 return std::make_unique<AndroidSurfaceDynamicImpeller>(cast_ptr);
85 }
86 switch (android_context_->RenderingApi()) {
87#if !SLIMPELLER
89 return std::make_unique<AndroidSurfaceSoftware>();
91 return std::make_unique<AndroidSurfaceGLSkia>(
92 std::static_pointer_cast<AndroidContextGLSkia>(android_context_));
93#endif // !SLIMPELLER
95 return std::make_unique<AndroidSurfaceGLImpeller>(
96 std::static_pointer_cast<AndroidContextGLImpeller>(android_context_));
98 return std::make_unique<AndroidSurfaceVKImpeller>(
99 std::static_pointer_cast<AndroidContextVKImpeller>(android_context_));
101 auto cast_ptr = std::static_pointer_cast<AndroidContextDynamicImpeller>(
102 android_context_);
103 return std::make_unique<AndroidSurfaceDynamicImpeller>(cast_ptr);
104 }
105 }
107}
#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: