fix(cursor): address sizing and capture review findings

This commit is contained in:
fufesou
2026-09-12 00:19:10 +08:00
parent be5fb304d4
commit a7f1eb4c25
12 changed files with 434 additions and 50 deletions

View File

@@ -101,7 +101,8 @@ bool FlutterWindow::OnCreate() {
return false;
}
RegisterPlugins(flutter_controller_->engine());
cursor_size::Register(flutter_controller_->engine()->messenger());
cursor_size::Register(flutter_controller_->engine()->messenger(),
flutter_controller_->view()->GetNativeWindow());
flutter::MethodChannel<> channel(
flutter_controller_->engine()->messenger(),
@@ -148,7 +149,8 @@ bool FlutterWindow::OnCreate() {
auto *flutter_view_controller =
reinterpret_cast<flutter::FlutterViewController *>(controller);
auto *registry = flutter_view_controller->engine();
cursor_size::Register(registry->messenger());
cursor_size::Register(registry->messenger(),
flutter_view_controller->view()->GetNativeWindow());
TextureRgbaRendererPluginCApiRegisterWithRegistrar(
registry->GetRegistrarForPlugin("TextureRgbaRendererPlugin"));
FlutterGpuTextureRendererPluginCApiRegisterWithRegistrar(