#include <manager.h>
Definition at line 39 of file manager.h.
◆ ~Manager()
flutter::egl::Manager::~Manager |
( |
| ) |
|
|
virtual |
◆ Manager()
Definition at line 26 of file manager.cc.
29 if (!InitializeDisplay(gpu_preference)) {
33 if (!InitializeConfig()) {
37 if (!InitializeContexts()) {
Referenced by Create().
◆ Create()
Definition at line 17 of file manager.cc.
18 std::unique_ptr<Manager> manager;
19 manager.reset(
new Manager(gpu_preference));
20 if (!manager->IsValid()) {
23 return std::move(manager);
References Manager().
◆ CreateSurfaceFromHandle()
EGLSurface flutter::egl::Manager::CreateSurfaceFromHandle |
( |
EGLenum |
handle_type, |
|
|
EGLClientBuffer |
handle, |
|
|
const EGLint * |
attributes |
|
) |
| const |
Definition at line 310 of file manager.cc.
313 return ::eglCreatePbufferFromClientBuffer(display_, handle_type, handle,
314 config_, attributes);
◆ CreateWindowSurface()
std::unique_ptr< WindowSurface > flutter::egl::Manager::CreateWindowSurface |
( |
HWND |
hwnd, |
|
|
size_t |
width, |
|
|
size_t |
height |
|
) |
| |
|
virtual |
Definition at line 276 of file manager.cc.
279 if (!hwnd || !is_valid_) {
286 const EGLint surface_attributes[] = {EGL_FIXED_SIZE_ANGLE,
289 static_cast<EGLint
>(width),
291 static_cast<EGLint
>(height),
294 auto const surface = ::eglCreateWindowSurface(
295 display_, config_,
static_cast<EGLNativeWindowType
>(hwnd),
297 if (surface == EGL_NO_SURFACE) {
302 return std::make_unique<WindowSurface>(display_, render_context_->GetHandle(),
303 surface, width, height);
References flutter::egl::LogEGLError().
Referenced by flutter::FlutterWindowsView::CreateRenderSurface().
◆ egl_display()
EGLDisplay flutter::egl::Manager::egl_display |
( |
| ) |
const |
|
inline |
◆ GetDevice()
bool flutter::egl::Manager::GetDevice |
( |
ID3D11Device ** |
device | ) |
|
Definition at line 317 of file manager.cc.
318 if (!resolved_device_) {
319 if (!InitializeDevice()) {
324 resolved_device_.CopyTo(device);
325 return (resolved_device_ !=
nullptr);
◆ GetLowPowerGpuLuid()
std::optional< LUID > flutter::egl::Manager::GetLowPowerGpuLuid |
( |
| ) |
|
|
static |
Definition at line 336 of file manager.cc.
337 Microsoft::WRL::ComPtr<IDXGIFactory1> factory1 =
nullptr;
338 Microsoft::WRL::ComPtr<IDXGIFactory6> factory6 =
nullptr;
339 Microsoft::WRL::ComPtr<IDXGIAdapter1> adapter =
nullptr;
340 HRESULT hr = ::CreateDXGIFactory1(IID_PPV_ARGS(&factory1));
344 hr = factory1->QueryInterface(IID_PPV_ARGS(&factory6));
350 hr = factory6->EnumAdapterByGpuPreference(
351 0, DXGI_GPU_PREFERENCE_MINIMUM_POWER, IID_PPV_ARGS(&adapter));
352 if (FAILED(hr) || adapter ==
nullptr) {
356 DXGI_ADAPTER_DESC desc;
357 hr = adapter->GetDesc(&desc);
361 return std::make_optional(desc.AdapterLuid);
Referenced by flutter::testing::TEST_F().
◆ HasContextCurrent()
bool flutter::egl::Manager::HasContextCurrent |
( |
| ) |
|
Definition at line 306 of file manager.cc.
307 return ::eglGetCurrentContext() != EGL_NO_CONTEXT;
◆ IsValid()
bool flutter::egl::Manager::IsValid |
( |
| ) |
const |
◆ render_context()
Context * flutter::egl::Manager::render_context |
( |
| ) |
const |
|
virtual |
Definition at line 328 of file manager.cc.
329 return render_context_.get();
◆ resource_context()
Context * flutter::egl::Manager::resource_context |
( |
| ) |
const |
|
virtual |
Definition at line 332 of file manager.cc.
333 return resource_context_.get();
The documentation for this class was generated from the following files: