- 01 8月, 2018 1 次提交
-
-
由 James D. Lin 提交于
* Deprecate -[FlutterDartProject initFromDefaultSourceForConfiguration] (#18886) `-[FlutterDartProject initFromDefaultSourceForConfiguration]` no longer seems very useful. It calls `-initWithPrecompiledDartBundle:` or `-initWithFlutterAssets:dartMain:packages:`, but since it now passes `nil` for all arguments, both paths end up doing the same thing. Additionally, `-initFromDefaultSourceForConfiguration` is awkward to use in Swift. The automatically generated Swift interface is: public convenience init!(fromDefaultSourceForConfiguration: ()) and it's not obvious how to call that. Let's deprecate `-initFromDefaultSourceForConfiguration` and instead expect callers to use the existing `-init` method. (We can make `-init` do different things for different build configurations later if necessary.) Bonus: Rename some parameters to make it more obvious when they may be `nil`.
-
- 27 7月, 2018 1 次提交
-
-
由 Chinmay Garde 提交于
-
- 17 7月, 2018 1 次提交
-
-
由 Jonah Williams 提交于
-
- 14 7月, 2018 2 次提交
-
-
由 Jonah Williams 提交于
Reverts flutter/engine#5740
-
由 Jonah Williams 提交于
-
- 02 7月, 2018 1 次提交
-
-
由 matthew-carroll 提交于
* Support all keyboard actions. (#11344)
-
- 21 6月, 2018 1 次提交
-
-
由 Sigurd Meldgaard 提交于
-
- 06 6月, 2018 1 次提交
-
-
由 Sigurd Meldgaard 提交于
* Move the handling of delegating AppDelegate callback out of FlutterAppDelegate. Also moves the plugin registry to FlutterViewController. So each view-controller will handle its own plugins. This is intended to simplify including one or more Flutter views in an existing iOS app and giving more precise control of plugin registration. Fixes: https://github.com/flutter/flutter/issues/16539 * formatting * Update license golden file * Fixed type error * FREEZE.unindexed * Fix Header types * Revert "FREEZE.unindexed" This reverts commit bebb70056c9bcb90b4321bdc2873896623ed6faa.
-
- 18 5月, 2018 1 次提交
-
-
由 Alexander Aprelev 提交于
This reverts commit 597fa9ed as it broke mac engine build bot.
-
- 17 5月, 2018 1 次提交
-
-
由 Sigurd Meldgaard 提交于
* Move the handling of delegating AppDelegate callback out of FlutterAppDelegate. Also moves the plugin registry to FlutterViewController. So each view-controller will handle its own plugins. This is intended to simplify including one or more Flutter views in an existing iOS app and giving more precise control of plugin registration. Fixes: https://github.com/flutter/flutter/issues/16539 * formatting * Update license golden file
-
- 18 4月, 2018 1 次提交
-
-
由 Michael Goderbauer 提交于
-
- 14 4月, 2018 1 次提交
-
-
由 Chinmay Garde 提交于
* Re-land "Support multiple shells in a single process. (#4932)" This reverts commit 723c7d01.
-
- 13 4月, 2018 1 次提交
-
-
由 Vyacheslav Egorov 提交于
This reverts commit a3327bff.
-
- 12 4月, 2018 1 次提交
-
-
由 Chinmay Garde 提交于
This reverts commit 9199b40f.
-
- 11 4月, 2018 2 次提交
-
-
由 Chinmay Garde 提交于
This reverts commit 6baff4c8.
-
由 Chinmay Garde 提交于
* Support multiple shells in a single process. The Flutter Engine currently works by initializing a singleton shell instance. This shell has to be created on the platform thread. The shell is responsible for creating the 3 main threads used by Flutter (UI, IO, GPU) as well as initializing the Dart VM. The shell, references to task runners of the main threads as well as all snapshots used for VM initialization are stored in singleton objects. The Flutter shell only creates the threads, rasterizers, contexts, etc. to fully support a single Flutter application. Current support for multiple Flutter applications is achieved by making multiple applications share the same resources (via the platform views mechanism). This scheme has the following limitations: * The shell is a singleton and there is no way to tear it down. Once you run a Flutter application in a process, all resources managed by it will remain referenced till process termination. * The threads on which the shell performs its operations are all singletons. These threads are never torn down and multiple Flutter applications (if present) have to compete with one another on these threads. * Resources referenced by the Dart VM are leaked because the VM isn't shutdown even when there are no more Flutter views. * The shell as a target does not compile on Fuchsia. The Fuchsia content handler uses specific dependencies of the shell to rebuild all the shell dependencies on its own. This leads to differences in frame scheduling, VM setup, service protocol endpoint setup, tracing, etc.. Fuchsia is very much a second class citizen in this world. * Since threads and message loops are managed by the engine, the engine has to know about threading and platform message loop interop on each supported platform. Specific updates in this patch: * The shell is no longer a singleton and the embedder holds the unique reference to the shell. * Shell setup and teardown is deterministic. * Threads are no longer managed by the shell. Instead, the shell is given a task runner configuration by the embedder. * Since the shell does not own its threads, the embedder can control threads and the message loops operating on these threads. The shell is only given references to the task runners that execute tasks on these threads. * The shell only needs task runner references. These references can be to the same task runner. So, if the embedder thinks that a particular Flutter application would not need all the threads, it can pass references to the same task runner. This effectively makes Flutter application run in single threaded mode. There are some places in the shell that make synchronous calls, these sites have been updated to ensure that they don’t deadlock. * The test runner and the headless Dart code runner are now Flutter applications that are effectively single threaded (since they don’t have rendering concerns of big-boy Flutter application). * The embedder has to guarantee that the threads and outlive the shell. It is easy for the embedder to make that guarantee because shell termination is deterministic. * The embedder can create as many shell as it wants. Typically it creates a shell per Flutter application with its own task runner configuration. Most embedders obtain these task runners from threads dedicated to the shell. But, it is entirely possible that the embedder can obtain these task runners from a thread pool. * There can only be one Dart VM in the process. The numerous shell interact with one another to manage the VM lifecycle. Once the last shell goes away, the VM does as well and hence all resources associated with the VM are collected. * The shell as a target can now compile and run on Fuchsia. The current content handler has been removed from the Flutter engine source tree and a new implementation has been written that uses the new shell target. * Isolate management has been significantly overhauled. There are no owning references to Dart isolates within the shell. The VM owns the only strong reference to the Dart isolate. The isolate that has window bindings is now called the root isolate. Child isolates can now be created from the root isolate and their bindings and thread configurations are now inherited from the root isolate. * Terminating the shell terminates its root isolates as well as all the isolates spawned by this isolate. This is necessary be shell shutdown is deterministic and the embedder is free to collect the threads on which the isolates execute their tasks (and listen for mircrotasks flushes on). * Launching the root isolate is now significantly overhauled. The shell side (non-owning) reference to an isolate is now a little state machine and illegal state transitions should be impossible (barring construction issues). This is the only way to manage Dart isolates in the shell (the shell does not use the C API is dart_api.h anymore). * Once an isolate is launched, it must be prepared (and hence move to the ready phase) by associating a snapshot with the same. This snapshot can either be a precompiled snapshot, kernel snapshot, script snapshot or source file. Depending on the kind of data specified as a snapshot as well as the capabilities of the VM running in the process, isolate preparation can fail preparation with the right message. * Asset management has been significantly overhauled. All asset resolution goes through an abstract asset resolver interface. An asset manager implements this interface and manages one or more child asset resolvers. These asset resolvers typically resolve assets from directories, ZIP files (legacy FLX assets if provided), APK bundles, FDIO namespaces, etc… * Each launch of the shell requires a separate and fully configured asset resolver. This is necessary because launching isolates for the engine may require resolving snapshots as assets from the asset resolver. Asset resolvers can be shared by multiple launch instances in multiple shells and need to be thread safe. * References to the command line object have been removed from the shell. Instead, the shell only takes a settings object that may be configured from the command line. This makes it easy for embedders and platforms that don’t have a command line (Fuchsia) to configure the shell. Consequently, there is only one spot where the various switches are read from the command line (by the embedder and not the shell) to form the settings object. * All platform now respect the log tag (this was done only by Android till now) and each shell instance have its own log tag. This makes logs from multiple Flutter application in the same process (mainly Fuchsia) more easily decipherable. * The per shell IO task runner now has a new component that is unfortunately named the IOManager. This component manages the IO GrContext (used for asynchronous texture uploads) that cooperates with the GrContext on the GPU task runner associated with the shell. The IOManager is also responsible for flushing tasks that collect Skia objects that reference GPU resources during deterministic shell shutdown. * The embedder now has to be careful to only enable Blink on a single instance of the shell. Launching the legacy text layout and rendering engine multiple times is will trip assertions. The entirety of this runtime has been separated out into a separate object and can be removed in one go when the migration to libtxt is complete. * There is a new test target for the various C++ objects that the shell uses to interact with the Dart VM (the shell no longer use the C API in dart_api.h). This allows engine developers to test VM/Isolate initialization and teardown without having the setup a full shell instance. * There is a new test target for the testing a single shell instances without having to configure and launch an entire VM and associated root isolate. * Mac, Linux & Windows used to have different target that created the flutter_tester referenced by the tool. This has now been converted into a single target that compiles on all platforms. * WeakPointers vended by the fml::WeakPtrFactory(notice the difference between the same class in the fxl namespace) add threading checks on each use. This is enabled by getting rid of the “re-origination” feature of the WeakPtrFactory in the fxl namespace. The side effect of this is that all non-thread safe components have to be created, used and destroyed on the same thread. Numerous thread safety issues were caught by this extra assertion and have now been fixed. * Glossary of components that are only safe on a specific thread (and have the fml variants of the WeakPtrFactory): * Platform Thread: Shell * UI Thread: Engine, RuntimeDelegate, DartIsolate, Animator * GPU Thread: Rasterizer, Surface * IO Thread: IOManager This patch was reviewed in smaller chunks in the following pull requests. All comments from the pulls requests has been incorporated into this patch: * flutter/assets: https://github.com/flutter/engine/pull/4829 * flutter/common: https://github.com/flutter/engine/pull/4830 * flutter/content_handler: https://github.com/flutter/engine/pull/4831 * flutter/flow: https://github.com/flutter/engine/pull/4832 * flutter/fml: https://github.com/flutter/engine/pull/4833 * flutter/lib/snapshot: https://github.com/flutter/engine/pull/4834 * flutter/lib/ui: https://github.com/flutter/engine/pull/4835 * flutter/runtime: https://github.com/flutter/engine/pull/4836 * flutter/shell: https://github.com/flutter/engine/pull/4837 * flutter/synchronization: https://github.com/flutter/engine/pull/4838 * flutter/testing: https://github.com/flutter/engine/pull/4839
-
- 21 3月, 2018 1 次提交
-
-
由 Sarah Zakarias 提交于
-
- 02 3月, 2018 1 次提交
-
-
由 Chris Bracken 提交于
NSLocale objectForKey: may return nil for NSLocaleLanguageCode and NSLocateCountryCode in certain cases. This adds a defensive nil check for such cases.
-
- 14 2月, 2018 1 次提交
-
-
由 Chris Bracken 提交于
Place all iOS code that relies on APIs introduced in iOS versions later than our base SDK version (iOS 8) behind @Available checks. This allows us to enable the -Wunguarded-availability compiler flag for iOS builds in the buildroot repo.
-
- 06 2月, 2018 1 次提交
-
-
由 Yegor 提交于
* implement iOS text field editing in a11y mode * address Chinmay's comments * replace node in child list when changing type
-
- 31 1月, 2018 1 次提交
-
-
由 Chris Bracken 提交于
Use @Available checks for iOS 11 features
-
- 27 1月, 2018 2 次提交
-
-
由 Chris Bracken 提交于
This reverts commit 89b6d435. Apparently the clang toolchain is still hitting issues. Will give this another go after the next clang toolchain update.
-
由 Chris Bracken 提交于
Guard code that deals with iOS safe area insets behind an @Available check. This cleans up some old TODOs from before out clang toolchain supported @Available.
-
- 25 1月, 2018 1 次提交
-
-
由 Yegor 提交于
-
- 13 12月, 2017 1 次提交
-
-
由 najeira 提交于
This change ensures that touches are mapped to the Flutter view co-ordinate system. In the case of a Flutter view that doesn't share the same origin and orientation as the screen co-ordinate system, touches were appled in the wrong location. This bug affected Flutter views whose origin was not the screen origin and Flutter apps running with the in-call status bar on iPhones other than the iPhone X.
-
- 09 12月, 2017 1 次提交
-
-
由 Chris Bracken 提交于
This adds support for scrolling the primary scroll view to the top on status bar touches, on the iPhone X. Notes: 1. The iPhone X status bar doesn't change height when in in-call/etc. mode, and unlike other iPhones, does scroll to top when in in-call mode. 2. No matter which model of iOS device, the top safe area inset doesn't change when in in-call mode. In in-call mode, the OS reduces the app view height by 20px off the top, and the double-height 'in-call' status bar covers this new inset (outside the view) and there continues to be a 20px safe area in the app. On iOS 11, rather than comparing status bar height to a hardcoded 20px 'standard height' we now compare to the top safe area inset (which is always the standard status bar height, regardless of device). On iOS versions prior to iOS 11, we use the previous logic. Fixes flutter/flutter#13439
-
- 08 12月, 2017 1 次提交
-
-
由 Chris Bracken 提交于
Keyboard height is now treated as a view inset, which could be used to shrink the content area of the app as is done in the Material Scaffold, rather than padding, which is used to indicate content areas where user interaction should be avoided.
-
- 07 12月, 2017 1 次提交
-
-
由 Chris Bracken 提交于
This allows for us to start migrating framework classes (notably Scaffold) to use window.viewInsets.bottom to get the keyboard height. Once framework updates have landed, we will land an engine patch to expose the iOS bottom safe area inset as padding. This change is already landed for Android. Related issue: flutter/flutter#12098
-
- 02 12月, 2017 1 次提交
-
-
由 xster 提交于
* Add synchronization to ResourceContext usage * debug * Use unique ptr factory * formatting * left more notes for future readers
-
- 30 11月, 2017 1 次提交
-
-
由 Chris Bracken 提交于
Window.viewInsets is the set of window-relative insets that describe the area of the window that an application may want to treat as effectively reducing the size of the content. Typically this is due to system UI that fully obscures underlying content, such as the keyboard. This area differs from padding in that padding is the set of insets that describe the area of the window that may be partially (or fully) obscured by system UI or physical intrusions into the view area (e.g. iPhone X sensor housing, status bar, or the iPhone X home indicator widget). This patch does not yet enable the iOS bottom edge safe area. Once the framework has been updated to use viewInsets for bottom-edge occlusions (today, the keyboard), the bottom safe area will be enabled and framework patches that depend on it, landed.
-
- 09 11月, 2017 2 次提交
-
-
由 Chris Bracken 提交于
With the update to HEAD of the Fuchsia buildtools repo, the new clang toolchain picked up caused link-time breakage in android x86_64 libFlutter.so builds. Sample log: https://build.chromium.org/p/client.flutter/builders/Linux%20Engine/builds/1974/steps/build%20android_debug_x64/logs/stdio Sample failure: FAILED: libflutter.so libflutter.so.TOC lib.stripped/libflutter.so ../../third_party/android_tools/ndk/toolchains/x86_64-4.9/prebuilt/linux-x86_64/lib/gcc/x86_64-linux-android/4.9.x/../../../../x86_64-linux-android/bin/ld.gold: error: obj/flutter/shell/platform/android/libflutter/android_context_gl.o: unsupported reloc 42 against global symbol std::__ndk1::num_put<char, std::__ndk1::ostreambuf_iterator<char, std::__ndk1::char_traits<char> > >::id This reverts commit 8ad42f0d.
-
由 Chris Bracken 提交于
* Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5 This also updates Flutter buildroot to a6e52dbb776c45cc8c57d7143b8eb8b2e762fdfb which disables -Wtautological-constant-compare temporarily until https://reviews.llvm.org/D39462 lands in clang. This is in line with Fuchsia's compiler options. * Apply clang-format diffs No logical changes. This applies clang-format from the latest Fuchsia buildtools to the engine codebase.
-
- 08 11月, 2017 1 次提交
-
-
由 Chris Bracken 提交于
On iOS 11 and above, update viewport padding and notify the framework when changes to safe area insets occur.
-
- 04 11月, 2017 1 次提交
-
-
由 Chris Bracken 提交于
There are two different sets of view insets that applications may want to track in order to avoid unwanted interaction with system UI: 1. OS UI that effectively shrinks the Flutter view from a UX point of view: e.g., when the keyboard opens, it occludes the bottom of the screen and the view should be adjusted such that the bottom, for the purposes of scrolling is just above the keyboard. 2. OS UI that is overlaid over the application, but into which the application should draw. e.g., the Home indicator on the iPhone X typically appears near the bottom of the screen, overlaid over app content. Content should be rendered within this 'safe area' but apps should avoid requiring user interaction there. For example, list views may want to include some small amount of additional padding to ensure the last list item can scroll above this area. Since Flutter does not currently distinguish between these two cases, this patch disables the bottom safe area inset until API is added to support these separately.
-
- 02 11月, 2017 1 次提交
-
-
由 Chinmay Garde 提交于
-
- 01 11月, 2017 2 次提交
-
-
由 Chris Bracken 提交于
On hide keyboard, reset the bottom padding to the safe area inset on devices running iOS 11 or higher.
-
由 Chris Bracken 提交于
This change exposes the view safe area insets (introduced in iOS 11) to the framework via MediaQuery.of(context).padding. Safe area insets are the view insets (padding) inside of which content can be relied on to display without truncation/clipping, as would occur with e.g. the iPhone X sensor notch. As this API was added in iOS 11, we place it behind a runtime guard checking OS level. Until the runtime support for @avialable lands in the next Fuchsia buildtools rev, ignore -Wunguarded-availability-new around the safe area insets check and use an FML runtime check instead.
-
- 26 10月, 2017 1 次提交
-
-
由 Michael Goderbauer 提交于
This reverts commit a48b5f6d.
-
- 25 10月, 2017 1 次提交
-
-
由 krisgiesing 提交于
Refactoring related to use of the embedder APIs on macOS host builds.
-
- 19 10月, 2017 1 次提交
-
-
由 Yegor 提交于
* systems/settings channel split * merge textScaleFactor and alwaysUse24HourFormat into flutter/settings channel * add debugOverrideAlwaysUse24HourFormat * implement textScaleFactor on iOS * address comments * remove debugOverrideAlwaysUse24HourFormat * clang-format
-