Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5ae1aed

Browse files
committed
Fix CR comments
1 parent 4439679 commit 5ae1aed

File tree

2 files changed

+9
-11
lines changed

2 files changed

+9
-11
lines changed

shell/platform/embedder/embedder.cc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,24 +1012,22 @@ FlutterEngineResult FlutterEngineInitialize(size_t version,
10121012
"embedder, got 0 active displays.");
10131013
}
10141014

1015-
display_settings.displays =
1016-
new FlutterDisplay[display_settings.display_count];
1015+
std::vector<FlutterDisplay> displays(display_settings.display_count);
1016+
display_settings.displays = displays.data();
10171017
display_settings_callback(user_data, &display_settings);
10181018

10191019
// TODO(iskakaushik): Add support for multiple displays.
10201020
main_display_refresh_rate = display_settings.displays[0].refresh_rate;
1021-
1022-
delete display_settings.displays;
10231021
}
10241022

10251023
flutter::PlatformViewEmbedder::PlatformDispatchTable platform_dispatch_table =
10261024
{
1027-
update_semantics_nodes_callback, //
1028-
update_semantics_custom_actions_callback, //
1029-
platform_message_response_callback, //
1030-
vsync_callback, //
1031-
compute_platform_resolved_locale_callback, //
1032-
static_cast<float>(main_display_refresh_rate), //
1025+
update_semantics_nodes_callback, //
1026+
update_semantics_custom_actions_callback, //
1027+
platform_message_response_callback, //
1028+
vsync_callback, //
1029+
compute_platform_resolved_locale_callback, //
1030+
main_display_refresh_rate, //
10331031
};
10341032

10351033
auto on_create_platform_view = InferPlatformViewCreationCallback(

shell/platform/embedder/platform_view_embedder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class PlatformViewEmbedder final : public PlatformView {
3939
VsyncWaiterEmbedder::VsyncCallback vsync_callback; // optional
4040
ComputePlatformResolvedLocaleCallback
4141
compute_platform_resolved_locale_callback;
42-
float display_refresh_rate;
42+
double display_refresh_rate;
4343
};
4444

4545
// Creates a platform view that sets up an OpenGL rasterizer.

0 commit comments

Comments
 (0)