-
Notifications
You must be signed in to change notification settings - Fork 28.8k
[Windows] Add public API to get the view's D3D11 device #164578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
2b0041b
78b99ab
1a6c4e2
31f45d6
9b6ca14
a9c50a7
93bdf36
9438c4d
727a91d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -28,6 +28,10 @@ typedef struct FlutterDesktopViewController* FlutterDesktopViewControllerRef; | |||||||||
struct FlutterDesktopView; | ||||||||||
typedef struct FlutterDesktopView* FlutterDesktopViewRef; | ||||||||||
|
||||||||||
// Opaque reference to a Flutter's ID3D11Device. | ||||||||||
struct FlutterID3D11Device; | ||||||||||
typedef struct FlutterID3D11Device* FlutterID3D11DeviceRef; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm surprised to see an opaque struct here. I would imagine the user would want the raw |
||||||||||
|
||||||||||
// Opaque reference to a Flutter engine instance. | ||||||||||
struct FlutterDesktopEngine; | ||||||||||
typedef struct FlutterDesktopEngine* FlutterDesktopEngineRef; | ||||||||||
|
@@ -245,6 +249,10 @@ FLUTTER_EXPORT HWND FlutterDesktopViewGetHWND(FlutterDesktopViewRef view); | |||||||||
FLUTTER_EXPORT IDXGIAdapter* FlutterDesktopViewGetGraphicsAdapter( | ||||||||||
FlutterDesktopViewRef view); | ||||||||||
|
||||||||||
// Returns the ID3D11Device used for rendering or nullptr in case of error. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should call out the lifetime of the returned value. Should we be pessimistic and state the lifetime is only as long as the view? (This isn't strictly true today, the lifetime is as long as the engine. But being conservative here seems useful?)
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm since multi-window is going to be a thing ig would be right to say |
||||||||||
FLUTTER_EXPORT FlutterID3D11DeviceRef FlutterDesktopPluginViewGetID3D11Device( | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's call this |
||||||||||
FlutterDesktopViewRef view); | ||||||||||
|
||||||||||
// Called to pass an external window message to the engine for lifecycle | ||||||||||
// state updates. Non-Flutter windows must call this method in their WndProc | ||||||||||
// in order to be included in the logic for application lifecycle state | ||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you undo this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
really annoying to open
code
under.../engine
but yeahThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh for engine development you probably should open either the repo's root or
engine/src/flutter/
. That has the proper.gitignore
here:https://github.com/flutter/flutter/blob/master/engine/src/flutter/.gitignore#L51