52 : gl_dispatch_table_(std::move(gl_dispatch_table)),
53 fbo_reset_after_present_(fbo_reset_after_present),
54 external_view_embedder_(std::move(external_view_embedder)),
55 worker_(std::make_shared<ReactorWorker>()) {
56
63 return;
64 }
65
66
68
69 std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
70 std::make_shared<fml::NonOwnedMapping>(
71 impeller_entity_shaders_gles_data,
72 impeller_entity_shaders_gles_length),
73 std::make_shared<fml::NonOwnedMapping>(
74 impeller_modern_shaders_gles_data,
75 impeller_modern_shaders_gles_length),
76 std::make_shared<fml::NonOwnedMapping>(
77 impeller_framebuffer_blend_shaders_gles_data,
78 impeller_framebuffer_blend_shaders_gles_length),
79#if IMPELLER_ENABLE_3D
80 std::make_shared<fml::NonOwnedMapping>(
81 impeller_scene_shaders_gles_data, impeller_scene_shaders_gles_length),
82#endif
83 };
84 auto gl = std::make_unique<impeller::ProcTableGLES>(
87 return;
88 }
89
91 std::move(
gl), shader_mappings,
false);
92
93 if (!impeller_context_) {
95 return;
96 }
97
98 auto worker_id = impeller_context_->AddReactorWorker(worker_);
99 if (!worker_id.has_value()) {
101 return;
102 }
103
105 FML_LOG(IMPORTANT) <<
"Using the Impeller rendering backend (OpenGL).";
106 valid_ = true;
107}
static std::shared_ptr< ContextGLES > Create(std::unique_ptr< ProcTableGLES > gl, const std::vector< std::shared_ptr< fml::Mapping > > &shader_libraries, bool enable_gpu_tracing)
#define FML_LOG(severity)
std::function< bool(void)> gl_clear_current_callback
std::function< GLFBOInfo(intptr_t)> gl_populate_existing_damage
std::function< bool(void)> gl_make_current_callback
std::function< intptr_t(GLFrameInfo)> gl_fbo_callback
std::function< bool(GLPresentInfo)> gl_present_callback
std::function< void *(const char *)> gl_proc_resolver