Skip to content

Win32: Add FlutterDesktopPluginRegistrarGetGraphicsAdapter#185580

Merged
knopp merged 3 commits into
flutter:masterfrom
knopp:win_registrar_get_graphics_adapter
Apr 28, 2026
Merged

Win32: Add FlutterDesktopPluginRegistrarGetGraphicsAdapter#185580
knopp merged 3 commits into
flutter:masterfrom
knopp:win_registrar_get_graphics_adapter

Conversation

@knopp

@knopp knopp commented Apr 25, 2026

Copy link
Copy Markdown
Member

#184479 has added FlutterDesktopEngineGetGraphicsAdapter, but plugins don't have access to engine, only plugin registrar so there's no straightforward way for plugins to get the adapter. This PR fixes this by adding FlutterDesktopPluginRegistrarGetGraphicsAdapter.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@knopp knopp requested a review from a team as a code owner April 25, 2026 14:47
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop team-windows Owned by the Windows platform team labels Apr 25, 2026
@knopp knopp added CICD Run CI/CD and removed engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop team-windows Owned by the Windows platform team labels Apr 25, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds the GetGraphicsAdapter method to the Windows plugin registrar, enabling plugins to access the DXGI adapter used for rendering. The implementation includes updates to the public C API, the C++ client wrapper, and the testing framework. Feedback recommends adding a null check for the registrar in the C API, correcting a typo in a test name, and removing redundant expectations from the unit tests.

Comment thread engine/src/flutter/shell/platform/windows/flutter_windows.cc Outdated
@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically a: desktop Running on desktop team-windows Owned by the Windows platform team and removed CICD Run CI/CD labels Apr 25, 2026
@knopp knopp added the CICD Run CI/CD label Apr 25, 2026
Comment thread engine/src/flutter/shell/platform/windows/public/flutter_windows.h Outdated
loic-sharma
loic-sharma previously approved these changes Apr 25, 2026

@loic-sharma loic-sharma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo a docs nit

@knopp knopp force-pushed the win_registrar_get_graphics_adapter branch from 1e4a4d1 to 6c84880 Compare April 27, 2026 13:38
@github-actions github-actions Bot removed the CICD Run CI/CD label Apr 27, 2026
@knopp knopp added the CICD Run CI/CD label Apr 27, 2026
@knopp knopp requested a review from loic-sharma April 28, 2026 16:12

@loic-sharma loic-sharma left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@knopp knopp enabled auto-merge April 28, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-windows Building on or for Windows specifically team-windows Owned by the Windows platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants