Flutter >= 3.38 keeps its EGL contexts on the raster thread, so media_kit's video output found none on the platform thread and fell back to software rendering (no shaders, ~5 fps) on X11. The patched output opens Flutter's EGL display itself, steps GDK's GLX context aside on X11 and releases its own context. Patch from a friend's agent, kept in third_party/media_kit_video/starsync/. Wayland/NVIDIA still renders on the GPU (checked); the X11 path was verified on the friend's machine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
748 B
C++
34 lines
748 B
C++
// This file is a part of media_kit
|
|
// (https://github.com/media-kit/media-kit).
|
|
//
|
|
// Copyright © 2021 & onwards, Hitesh Kumar Saini <saini123hitesh@gmail.com>.
|
|
// All rights reserved.
|
|
// Use of this source code is governed by MIT license that can be found in the
|
|
// LICENSE file.
|
|
|
|
#ifndef UTILS_H_
|
|
#define UTILS_H_
|
|
|
|
#include <cstdint>
|
|
|
|
#include <Windows.h>
|
|
|
|
class Utils {
|
|
public:
|
|
static void EnterNativeFullscreen(HWND window);
|
|
|
|
static void ExitNativeFullscreen(HWND window);
|
|
|
|
static RTL_OSVERSIONINFOW GetWindowsVersion();
|
|
|
|
static bool IsWindows10RTMOrGreater();
|
|
|
|
private:
|
|
static constexpr auto kFlutterViewWindowClassName = L"FLUTTERVIEW";
|
|
|
|
static bool fullscreen_;
|
|
static RECT rect_before_fullscreen_;
|
|
};
|
|
|
|
#endif // UTILS_H_
|