When there are no pending timers, we should sit in glfwWaitEvents instead of
continuously calling glfwPollEvents. This reduces CPU utilization
significantly.
In the new ParagraphConstraints code path, we weren't converting through
LayoutUnit, so we weren't getting the right overflow behavior for extremely
large double values. This resulted in test/rendering/block_test.dart failing.
We don't need to use an explict version of the script snapshotter that is
packaged with the iOS SDK. Instead, we can rely on the flutter command having a
working snapshotter.
All the headers for Flutter.framework are now in framework/Headers and all the
source files for Flutter.framework are now in framework/Source. Previously it
was unclear that FlutterAppDelegate and main_ios.mm weren't part of
Flutter.framework. (They still build as part of the framework, but that's
something I'll fix in a later patch.)
This patch begins to update the Paragraph interface to something sensible. It
introduces a ParagraphConstraints object that is passed to layout() to control
the layout of the paragraph. Once clients are migrated over, the argument will
become required.
Previously the AOT snapshot was packaged as a dynamic library (similar to the
scheme used on iOS). This change eliminates the need for a native code
toolchain when building for AOT.
These were forcing our customers to obey these lints, but not all of our
customers like them. We might enable some of these in the future if they have
concrete benefits (e.g., faster generated code when compiling ahead-of-time).
This include build system changes for selecting Dart's precompiler mode
plus a way to locate and load the precompiled snapshot library from an
Android application
Instead, make Layer::Paint take a new PaintContext that has just exactly
the state that it needs, mirroring PrerollContext. Also, rename
PaintContext to CompositorContext because it holds the context for the
whole compositor.
Previously we were applying opacity in a different way than Skia
expects. Now we use the exact pattern that Skia expects so that we hit
more optimizations inside SkRecordOptimize.
After this patch, we don't actually get the optimization because we
don't yet run SkRecordOptimize over the composited tree. A later patch
will actually cause us to run SkRecordOptimize.
Dart invokes Start/StopTracing callbacks within the _setVMTimelineFlags service
method whenever the embedder timeline stream toggles on or off. Flutter's
implementation of these callbacks was modifying the set of enabled streams,
which could override the intended behavior of _setVMTimelineFlags.
Start/StopTracing will now only control Flutter's embedder-specific log.
Also needed to change the Flutter engine's --trace-startup flag to set the
corresponding timeline stream flag on the Dart VM.
The PlatformView may not receive the surfaceDestroy notification before its
activity is destroyed (this was happening on the Android emulator).
If this happens, allow the PlatformView to be detached and have it release
its window during destruction.