|
22 | 22 | namespace flutter { |
23 | 23 | namespace { |
24 | 24 |
|
| 25 | +const int kImplicitViewId = 0; |
| 26 | + |
25 | 27 | Dart_Handle ToByteData(const fml::Mapping& buffer) { |
26 | 28 | return tonic::DartByteData::Create(buffer.GetMapping(), buffer.GetSize()); |
27 | 29 | } |
@@ -67,8 +69,10 @@ void PlatformConfiguration::DidCreateIsolate() { |
67 | 69 | Dart_GetField(library, tonic::ToDart("_drawFrame"))); |
68 | 70 | report_timings_.Set(tonic::DartState::Current(), |
69 | 71 | Dart_GetField(library, tonic::ToDart("_reportTimings"))); |
70 | | - windows_.insert(std::make_pair( |
71 | | - 0, std::make_unique<Window>(0, ViewportMetrics{1.0, 0.0, 0.0, -1}))); |
| 72 | + windows_.insert( |
| 73 | + std::make_pair(kImplicitViewId, |
| 74 | + std::make_unique<Window>( |
| 75 | + kImplicitViewId, ViewportMetrics{1.0, 0.0, 0.0, -1}))); |
72 | 76 | } |
73 | 77 |
|
74 | 78 | void PlatformConfiguration::UpdateLocales( |
@@ -430,9 +434,9 @@ Dart_Handle PlatformConfigurationNativeApi::ComputePlatformResolvedLocale( |
430 | 434 | Dart_Handle PlatformConfigurationNativeApi::ImplicitViewEnabled() { |
431 | 435 | UIDartState::ThrowIfUIOperationsProhibited(); |
432 | 436 | bool enabled = UIDartState::Current() |
433 | | - ->platform_configuration() |
434 | | - ->client() |
435 | | - ->ImplicitViewEnabled(); |
| 437 | + ->platform_configuration() |
| 438 | + ->client() |
| 439 | + ->ImplicitViewEnabled(); |
436 | 440 |
|
437 | 441 | return Dart_NewBoolean(enabled); |
438 | 442 | } |
|
0 commit comments