8 #include "impeller/entity/gles/entity_shaders_gles.h"
9 #include "impeller/entity/gles/framebuffer_blend_shaders_gles.h"
15 std::function<
void*(
const char* gl_proc_name)> proc_address_callback) {
16 auto proc_table = std::make_unique<ProcTableGLES>(
18 if (!proc_table || !proc_table->IsValid()) {
22 std::vector<std::shared_ptr<fml::Mapping>> shader_mappings = {
23 std::make_shared<fml::NonOwnedMapping>(
24 impeller_entity_shaders_gles_data,
25 impeller_entity_shaders_gles_length),
26 std::make_shared<fml::NonOwnedMapping>(
27 impeller_framebuffer_blend_shaders_gles_data,
28 impeller_framebuffer_blend_shaders_gles_length),
31 Flags{}, std::move(proc_table), shader_mappings,
false);
32 if (!impeller_context) {
36 auto reactor_worker = std::make_shared<ReactorWorkerGLES>();
37 auto worker_id = impeller_context->AddReactorWorker(reactor_worker);
38 if (!worker_id.has_value()) {
42 return Create(std::move(impeller_context), std::move(reactor_worker));
46 std::shared_ptr<impeller::Context> impeller_context,
47 std::shared_ptr<ReactorWorkerGLES> worker) {
50 auto context = Adopt<Context>(
51 new ContextGLES(std::move(impeller_context), std::move(worker)));
53 if (!context->IsValid()) {
61 std::shared_ptr<ReactorWorkerGLES> worker)
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)
static ScopedObject< Context > Create(std::function< void *(const char *gl_proc_name)> proc_address_callback)