5#ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_EGL_MANAGER_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_EGL_MANAGER_H_
10#include <EGL/eglext.h>
11#include <EGL/eglplatform.h>
13#include <GLES2/gl2ext.h>
18#include <wrl/client.h>
21#include "flutter/fml/macros.h"
22#include "flutter/shell/platform/windows/egl/context.h"
23#include "flutter/shell/platform/windows/egl/surface.h"
24#include "flutter/shell/platform/windows/egl/window_surface.h"
33 static std::unique_ptr<Manager>
Create(
bool enable_impeller);
59 EGLClientBuffer handle,
60 const EGLint* attributes)
const;
77 explicit Manager(
bool enable_impeller);
81 static int instance_count_;
84 bool InitializeDisplay();
87 bool InitializeConfig(
bool enable_impeller);
90 bool InitializeContexts();
93 bool InitializeDevice();
98 bool is_valid_ =
false;
101 EGLDisplay display_ = EGL_NO_DISPLAY;
104 EGLConfig config_ =
nullptr;
107 std::unique_ptr<Context> render_context_;
110 std::unique_ptr<Context> resource_context_;
113 Microsoft::WRL::ComPtr<ID3D11Device> resolved_device_ =
nullptr;
115 FML_DISALLOW_COPY_AND_ASSIGN(
Manager);
virtual Context * resource_context() const
static std::unique_ptr< Manager > Create(bool enable_impeller)
EGLSurface CreateSurfaceFromHandle(EGLenum handle_type, EGLClientBuffer handle, const EGLint *attributes) const
Manager(bool enable_impeller)
virtual Context * render_context() const
virtual std::unique_ptr< WindowSurface > CreateWindowSurface(HWND hwnd, size_t width, size_t height)
bool GetDevice(ID3D11Device **device)
EGLDisplay egl_display() const