Previously we had passed a local generator to flow::BitmapImageCreate /
SkImage::MakeFromGenerator, which takes ownership of the generator.
That generator in turn referenced an SkData backed by a local vector.
The result was an SkImage backed by a deleted buffer.
In a previous change I re-included the observatory assets in the Fuchsia build, but didn't notice this bit here.
After this, if Settings::enable_observatory can be set to true somehow, the Observatory will come up in Flutter apps on Fuchsia. Unfortunately, I'm not sure how to do that.
Provide a default status bar tap handler for FlutterAppDelegate.
By default, taps are passed to the key window's rootViewController if
it's a FlutterViewController. Apps with custom app delegates can
customize this behaviour to send the tap to the FlutterViewController(s)
they prefer by overriding touchesBegan:withEvent.
The PlatformView superclass constructor was posting a task to the UI thread
that adds the view to the shell's global list. This could result in UI thread
operations seeing PlatformView instances that are not fully constructed and do
not yet have an engine.
This was happening in https://github.com/flutter/flutter/issues/7735
On iOS, when a tap is detected in the status bar, provide a means to
pass that touch event through to one or more FlutterViewControllers to
trigger a scroll to top. In iOS apps, scroll to top should occur under
the following conditions:
1. There is one and only one UIScrollView visible with
scrollsToTop == YES.
2. The status-bar is in standard height mode, not in double-height mode.
In double-height mode, the expected behaviour is to trigger a switch
to the application associated with the double-height status bar.
3. A tap or a drag gesture occurs that is entirely constrained to the
status bar frame. (We currently only handle the tap scenario).
Unfortunately, AppDelegates only get touchesBegan events for status bar
taps, though get get touchesBegan and touchesEnded events for drags
within the status bar frame. As such, we currently synthesise the
touchesEnded event for taps.
All samples and the 'flutter create' command now use a project-specifc
app delegate.
Any projects that still rely on FlutterAppDelegate should create an
empty delegate that subclasses UIResponder<UIApplicationDelegate> and
defines:
@property (strong, nonatomic) UIWindow *window;
* Roll Dart SDK to ed00447138f95ea4ba612509a244ca8205735372
Make the VM happy with a spurious instruction snapshot.
* Revert "Snapshots: Don't use an empty array where a NULL array is expected. (#3361)"
This reverts commit c3c478ec699bba863bd422292277bb984f506d1a.
Broke iOS simulator builds; should no longer be necessary after rolling
the Dart SDK to ed00447138f95ea4ba612509a244ca8205735372.
On iOS simulator builds, we were seeing DartLookupSymbolInLibrary return
a pointer to a address of the snapshot data rather than the address of
the snapshot buffer itself. On simulator builds we don't build the
snapshot data into a buffer in app.dylib (kDartVmSnapshotData) but link
it statically into the engine itself.
* Apply iOS status bar padding only to fullscreen views
Previously padding was applied to account for the status bar, whether in
standard or expanded 'in-call' geometry only if the current view was not
a subview of a containing view. This didn't cover the case of root views
embedded in other windows (e.g. dialogs).
We also ensure that the window is fullscreen to account for cases like
small dialogs centred on the screen.
* Do not apply padding if we're a subview in a containing view
* Handle double-height status bar on iOS
In certain cases, iOS displays a double-height status bar (e.g., when an
application is using device location or while in a call). In such cases,
iOS offsets the app view origin by 20px, reduces view height by 20px,
then overlays a 40px opaque status bar: 20px covering the newly opened
20px gap at the top of the screen, 20px covering the top 20px of the
view, which had previously been under the standard-sized status bar.
Flutter previously set top padding to the height of the status bar,
which resulted in 40px padding with a double-sized status bar. However,
the padding should match the portion of the status bar overlapping the
view, which is 20px.
Note that the final case is the one in which no status bar is shown and
padding should be zero.
* Only apply status bar padding on root views