Skip to content

Commit

Permalink
Fix broken Fuchsia test (flutter#20397)
Browse files Browse the repository at this point in the history
  • Loading branch information
arbreng authored Aug 11, 2020
1 parent 8c02e38 commit fafbcd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions shell/platform/fuchsia/flutter/platform_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,11 @@ std::unique_ptr<flutter::Surface> PlatformView::CreateRenderingSurface() {
// This platform does not repeatly lose and gain a surface connection. So the
// surface is setup once during platform view setup and returned to the
// shell on the initial (and only) |NotifyCreated| call.
auto view_embedder = on_get_view_embedder_callback_();
auto gr_context = on_get_gr_context_callback_();
auto view_embedder = on_get_view_embedder_callback_
? on_get_view_embedder_callback_()
: nullptr;
auto gr_context =
on_get_gr_context_callback_ ? on_get_gr_context_callback_() : nullptr;
return std::make_unique<Surface>(debug_label_, view_embedder, gr_context);
}

Expand Down
1 change: 1 addition & 0 deletions shell/platform/fuchsia/flutter/platform_view_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ TEST_F(PlatformViewTests, GetGrContextTest) {
services_provider.service_directory(), // runner_services
nullptr, // parent_environment_service_provider_handle
nullptr, // session_listener_request
nullptr, // focuser
nullptr, // on_session_listener_error_callback
nullptr, // session_metrics_did_change_callback
nullptr, // session_size_change_hint_callback
Expand Down

0 comments on commit fafbcd2

Please sign in to comment.