49 : gl_dispatch_table_(std::move(gl_dispatch_table)),
50 fbo_reset_after_present_(fbo_reset_after_present),
51 external_view_embedder_(std::move(external_view_embedder)),
52 worker_(std::make_shared<ReactorWorker>()) {
53
60 return;
61 }
62
63
65
66 std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
67 std::make_shared<fml::NonOwnedMapping>(
68 impeller_entity_shaders_gles_data,
69 impeller_entity_shaders_gles_length),
70 std::make_shared<fml::NonOwnedMapping>(
71 impeller_modern_shaders_gles_data,
72 impeller_modern_shaders_gles_length),
73 std::make_shared<fml::NonOwnedMapping>(
74 impeller_framebuffer_blend_shaders_gles_data,
75 impeller_framebuffer_blend_shaders_gles_length),
76 };
77 auto gl = std::make_unique<impeller::ProcTableGLES>(
79 if (!gl->IsValid()) {
80 return;
81 }
82
85 false);
86
87 if (!impeller_context_) {
88 FML_LOG(ERROR) <<
"Could not create Impeller context.";
89 return;
90 }
91
92 auto worker_id = impeller_context_->AddReactorWorker(worker_);
93 if (!worker_id.has_value()) {
94 FML_LOG(ERROR) <<
"Could not add reactor worker.";
95 return;
96 }
97
99 FML_LOG(IMPORTANT) <<
"Using the Impeller rendering backend (OpenGL).";
100 valid_ = true;
101}
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