-
Notifications
You must be signed in to change notification settings - Fork 6k
Make updating window metrics multi-view #43366
Changes from all commits
3630458
d0a43cd
3d86303
1a69ee9
a293b8e
7699ee8
1c57271
85adee8
ad0a0d6
d397d55
57e705e
1dfe95d
13764d7
e49b875
a71e5b5
6517132
14f5094
bc67089
2aaabb8
19a5e69
19f24b2
73790ca
4b57af3
f3cb395
03e4b53
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 |
|---|---|---|
|
|
@@ -677,16 +677,16 @@ class Engine final : public RuntimeDelegate, PointerDataDispatcher::Delegate { | |
| std::optional<uint32_t> GetUIIsolateReturnCode(); | ||
|
|
||
| //---------------------------------------------------------------------------- | ||
| /// @brief Updates the viewport metrics for the currently running Flutter | ||
| /// application. The viewport metrics detail the size of the | ||
| /// rendering viewport in texels as well as edge insets if | ||
| /// present. | ||
| /// @brief Updates the viewport metrics for a view. The viewport metrics | ||
| /// detail the size of the rendering viewport in texels as well as | ||
|
Member
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. Is texels correct here? It looks like that's a thing but it seems like pixels would make more sense.
Contributor
Author
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. This comment was written by @/chinmaygarde. Maybe you can ask him for details? (Since I'm not really familiar with texels either...) |
||
| /// edge insets if present. | ||
| /// | ||
| /// @see `ViewportMetrics` | ||
| /// | ||
| /// @param[in] metrics The metrics | ||
| /// @param[in] view_id The ID for the view that `metrics` describes. | ||
| /// @param[in] metrics The metrics. | ||
| /// | ||
| void SetViewportMetrics(const ViewportMetrics& metrics); | ||
| void SetViewportMetrics(int64_t view_id, const ViewportMetrics& metrics); | ||
|
|
||
| //---------------------------------------------------------------------------- | ||
| /// @brief Updates the display metrics for the currently running Flutter | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,8 @@ | |
| namespace flutter { | ||
|
|
||
| namespace { | ||
| constexpr int64_t kImplicitViewId = 0ll; | ||
|
|
||
| class MockDelegate : public Engine::Delegate { | ||
| public: | ||
| MOCK_METHOD2(OnEngineUpdateSemantics, | ||
|
|
@@ -330,7 +332,8 @@ TEST_F(EngineTest, SpawnResetsViewportMetrics) { | |
| const double kViewHeight = 1024; | ||
| old_viewport_metrics.physical_width = kViewWidth; | ||
| old_viewport_metrics.physical_height = kViewHeight; | ||
| mock_runtime_controller->SetViewportMetrics(old_viewport_metrics); | ||
| mock_runtime_controller->SetViewportMetrics(kImplicitViewId, | ||
| old_viewport_metrics); | ||
|
Member
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. This test uses
Contributor
Author
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. Yeah I added a TODO at
Contributor
Author
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. Actually, I don't think an extra one is needed here.
Member
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. Could you put a TODO on |
||
| auto engine = std::make_unique<Engine>( | ||
| /*delegate=*/delegate_, | ||
| /*dispatcher_maker=*/dispatcher_maker_, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.