82 : gl_dispatch_table_(std::move(gl_dispatch_table)),
83 fbo_reset_after_present_(fbo_reset_after_present),
84 external_view_embedder_(std::move(external_view_embedder)),
85 worker_(std::make_shared<ReactorWorker>()) {
86
93 return;
94 }
95
96
98
99 auto gl = std::make_unique<impeller::ProcTableGLES>(
101 if (!gl->IsValid()) {
102 return;
103 }
104
105 const auto is_gles3 =
107 const auto shader_mappings = GetShaderMappings(is_gles3);
108
110 impeller_flags, std::move(gl), shader_mappings,
111 false);
112
113 if (!impeller_context_) {
114 FML_LOG(ERROR) <<
"Could not create Impeller context.";
115 return;
116 }
117
118 auto worker_id = impeller_context_->AddReactorWorker(worker_);
119 if (!worker_id.has_value()) {
120 FML_LOG(ERROR) <<
"Could not add reactor worker.";
121 return;
122 }
123
126 FML_LOG(IMPORTANT) <<
"Using the Impeller rendering backend (OpenGLESSDF).";
127 } else {
128 FML_LOG(IMPORTANT) <<
"Using the Impeller rendering backend (OpenGLES).";
129 }
130 valid_ = true;
131}
static std::shared_ptr< ContextGLES > Create(const Flags &flags, 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
bool use_sdfs
Use SDFs for rendering.