feat(windows): measure the native system cursor size

This commit is contained in:
fufesou
2026-09-11 16:02:52 +08:00
parent eeff9eb121
commit 67b94c7906
2 changed files with 125 additions and 0 deletions

View File

@@ -18,6 +18,7 @@
#include <memory>
#include "win32_desktop.h"
#include "cursor_size.h"
namespace {
@@ -100,6 +101,7 @@ bool FlutterWindow::OnCreate() {
return false;
}
RegisterPlugins(flutter_controller_->engine());
cursor_size::Register(flutter_controller_->engine()->messenger());
flutter::MethodChannel<> channel(
flutter_controller_->engine()->messenger(),
@@ -146,6 +148,7 @@ bool FlutterWindow::OnCreate() {
auto *flutter_view_controller =
reinterpret_cast<flutter::FlutterViewController *>(controller);
auto *registry = flutter_view_controller->engine();
cursor_size::Register(registry->messenger());
TextureRgbaRendererPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("TextureRgbaRendererPlugin"));
FlutterGpuTextureRendererPluginCApiRegisterWithRegistrar(