83 : gl_dispatch_table_(std::move(gl_dispatch_table)),
84 fbo_reset_after_present_(fbo_reset_after_present),
85 external_view_embedder_(std::move(external_view_embedder)),
86 worker_(std::make_shared<ReactorWorker>()) {
87
94 return;
95 }
96
97
99
100 auto gl = std::make_unique<impeller::ProcTableGLES>(
102 if (!gl->IsValid()) {
103 return;
104 }
105
106 const auto is_gles3 =
108 const auto shader_mappings = GetShaderMappings(is_gles3);
109
111 impeller_flags, std::move(gl), shader_mappings,
112 false, std::move(io_task_runner));
113
114 if (!impeller_context_) {
115 FML_LOG(ERROR) <<
"Could not create Impeller context.";
116 return;
117 }
118
119 auto worker_id = impeller_context_->AddReactorWorker(worker_);
120 if (!worker_id.has_value()) {
121 FML_LOG(ERROR) <<
"Could not add reactor worker.";
122 return;
123 }
124
127 FML_LOG(IMPORTANT) <<
"Using the Impeller rendering backend (OpenGLESSDF).";
128 } else {
129 FML_LOG(IMPORTANT) <<
"Using the Impeller rendering backend (OpenGLES).";
130 }
131 valid_ = true;
132}
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, std::shared_ptr< fml::BasicTaskRunner > io_task_runner=nullptr)
#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.