Flutter Engine
flutter::AndroidSurfaceFactoryImpl Class Reference

#include <platform_view_android.h>

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

Public Member Functions

 AndroidSurfaceFactoryImpl (std::shared_ptr< AndroidContext > context, std::shared_ptr< PlatformViewAndroidJNI > jni_facade)
 
 ~AndroidSurfaceFactoryImpl () override
 
std::unique_ptr< AndroidSurfaceCreateSurface () override
 
void SetExternalViewEmbedder (std::shared_ptr< AndroidExternalViewEmbedder > external_view_embedder)
 
- Public Member Functions inherited from flutter::AndroidSurfaceFactory
 AndroidSurfaceFactory ()=default
 
virtual ~AndroidSurfaceFactory ()=default
 

Detailed Description

Definition at line 25 of file platform_view_android.h.

Constructor & Destructor Documentation

◆ AndroidSurfaceFactoryImpl()

flutter::AndroidSurfaceFactoryImpl::AndroidSurfaceFactoryImpl ( std::shared_ptr< AndroidContext context,
std::shared_ptr< PlatformViewAndroidJNI jni_facade 
)

Definition at line 31 of file platform_view_android.cc.

References ~AndroidSurfaceFactoryImpl().

34  : android_context_(context), jni_facade_(jni_facade) {}

◆ ~AndroidSurfaceFactoryImpl()

flutter::AndroidSurfaceFactoryImpl::~AndroidSurfaceFactoryImpl ( )
overridedefault

Member Function Documentation

◆ CreateSurface()

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

Implements flutter::AndroidSurfaceFactory.

Definition at line 43 of file platform_view_android.cc.

References FML_CHECK, flutter::kOpenGLES, flutter::kSoftware, and flutter::kVulkan.

43  {
44  std::shared_ptr<AndroidExternalViewEmbedder> external_view_embedder =
45  external_view_embedder_.lock();
46  FML_CHECK(external_view_embedder);
47  switch (android_context_->RenderingApi()) {
49  return std::make_unique<AndroidSurfaceSoftware>(
50  android_context_, jni_facade_, external_view_embedder);
52  return std::make_unique<AndroidSurfaceGL>(android_context_, jni_facade_,
53  external_view_embedder);
55 #if SHELL_ENABLE_VULKAN
56  return std::make_unique<AndroidSurfaceVulkan>(
57  android_context_, jni_facade_, external_view_embedder);
58 #endif // SHELL_ENABLE_VULKAN
59  default:
60  return nullptr;
61  }
62  return nullptr;
63 }
#define FML_CHECK(condition)
Definition: logging.h:68

◆ SetExternalViewEmbedder()

void flutter::AndroidSurfaceFactoryImpl::SetExternalViewEmbedder ( std::shared_ptr< AndroidExternalViewEmbedder external_view_embedder)

Definition at line 38 of file platform_view_android.cc.

39  {
40  external_view_embedder_ = external_view_embedder;
41 }

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