Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
flutter::EmbedderExternalTextureResolver Class Reference

#include <embedder_external_texture_resolver.h>

Public Member Functions

 EmbedderExternalTextureResolver ()=default
 
 ~EmbedderExternalTextureResolver ()=default
 
std::unique_ptr< TextureResolveExternalTexture (int64_t texture_id)
 
bool SupportsExternalTextures ()
 

Detailed Description

Definition at line 21 of file embedder_external_texture_resolver.h.

Constructor & Destructor Documentation

◆ EmbedderExternalTextureResolver()

flutter::EmbedderExternalTextureResolver::EmbedderExternalTextureResolver ( )
default

◆ ~EmbedderExternalTextureResolver()

flutter::EmbedderExternalTextureResolver::~EmbedderExternalTextureResolver ( )
default

Member Function Documentation

◆ ResolveExternalTexture()

std::unique_ptr< Texture > flutter::EmbedderExternalTextureResolver::ResolveExternalTexture ( int64_t  texture_id)

Definition at line 25 of file embedder_external_texture_resolver.cc.

25 {
26#ifdef SHELL_ENABLE_GL
27 if (gl_callback_) {
28 return std::make_unique<EmbedderExternalTextureGL>(texture_id,
29 gl_callback_);
30 }
31#endif
32
33#ifdef SHELL_ENABLE_METAL
34 if (metal_callback_) {
35 return std::make_unique<EmbedderExternalTextureMetal>(texture_id,
36 metal_callback_);
37 }
38#endif
39
40 return nullptr;
41}
int64_t texture_id

◆ SupportsExternalTextures()

bool flutter::EmbedderExternalTextureResolver::SupportsExternalTextures ( )

Definition at line 43 of file embedder_external_texture_resolver.cc.

43 {
44#ifdef SHELL_ENABLE_GL
45 if (gl_callback_) {
46 return true;
47 }
48#endif
49
50#ifdef SHELL_ENABLE_METAL
51 if (metal_callback_) {
52 return true;
53 }
54#endif
55
56 return false;
57}

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