Commit Graph

3153 Commits

Author SHA1 Message Date
Chris Bracken
c3a99d4fbb Fix an extra paren in locale_test.dart (flutter/engine#4423) 2017-12-06 15:38:40 -08:00
Jason Simmons
c159071c43 libtxt: implement GetWordBoundary using the ICU word breaker (flutter/engine#4421) 2017-12-06 15:23:40 -08:00
Chris Bracken
cfc2cf4c3a Set window.viewInsets.bottom to keyboard height on iOS (flutter/engine#4420)
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
2017-12-06 15:06:12 -08:00
Jason Simmons
4d46c62401 libtxt: handle lines containing both LTR and RTL text runs (flutter/engine#4416)
* Call the ICU bidi API to divide the text into LTR/RTL runs and merge
  them with the styled runs defined by the application
* Maintain a list of glyph positions sorted by the order of the corresponding
  code units in the text, as well as a list of glyphs sorted by x/y coordinates
  in the layout
2017-12-06 14:46:03 -08:00
Ian Hickson
e900158d72 Make Locale know about the deprecated Hebrew language code. (flutter/engine#4411)
...by making it know about ALL the deprecated language and region codes.
2017-12-06 12:17:30 -08:00
Chris Bracken
cac7eba5ea Update the iOS mark region on setTextInputState (flutter/engine#4418)
Previously, we failed to clear/update the mark text range on updates
from the framework. This resulted in a crash if the incoming text value
was shorter than the current mark range when iOS attempts to extract the
mark range substring from the text.

Fixes flutter/flutter#12585
2017-12-06 11:30:14 -08:00
Brian Osman
49808d7687 Disable linear blending on iOS simulator (flutter/engine#4413)
Fixes flutter/flutter#13308

Overlooked this case when I previously removed linear blending. MakeS32 creates a surface with a color space attached (triggering the linear blending behavior). MakeN32 creates a legacy surface (no color space), which matches what the other backend bindings do (including the GL surface factory, and the raster cache).
2017-12-05 08:38:53 -05:00
Adam Barth
e76704006f [fuchsia] Sandbox Flutter runner (flutter/engine#4410) 2017-12-04 12:35:38 -08:00
Alexander Markov
e7d9371831 Front-end server: use VM-specific package:vm/kernel_front_end (flutter/engine#4412)
* Use the VM-specific wrapper for the kernel front-end to support VM-specific kernel transformations.
* Also, pass a flag to distinguish AOT mode from JIT mode to enable whole-program optimizations.
2017-12-02 17:37:32 -08:00
xster
9d2403ff10 Block image decoding on iOS in the background (flutter/engine#4384)
* Add synchronization to ResourceContext usage

* debug

* Use unique ptr factory

* formatting

* left more notes for future readers
2017-12-01 12:09:00 -08:00
Alexander Aprelev
e05c8cc2d8 Roll dart to 48a927acb2dc4178691b4ddfa817e87043e30b01 (flutter/engine#4409)
* Roll dart to f5fc335a4cdfcf96ae550044c64044ffe599e595

* Update license hash

* Roll a little further to pick up a revert

* Update hash
2017-12-01 11:13:31 -08:00
Ben Konyi
576964aa79 ifdef'd out unused code on non-Windows platforms (flutter/engine#4408) 2017-11-30 20:04:42 -05:00
Ben Konyi
31f0a6055c Changes to assets/ build/ flow/ runtime/ and shell/ to allow for compilation on Windows (flutter/engine#4407)
Made changes to assets/ build/ flow/ runtime/ and shell/ to allow for
compilation on Windows.
2017-11-30 19:47:20 -05:00
Ben Konyi
3f795be2a2 Added Windows support for libtxt in order to build flutter_tester.exe (flutter/engine#4395)
* Added Windows support for libtxt in order to build flutter_tester.exe.

Relatively minor changes were needed to get libtxt building on Windows
(missing/incompatiable headers, the odd syscall, path separators, etc.).
Windows doesn't render text in the same way as other platforms, so some tests
that checked for specific pixel offsets are disabled.
2017-11-30 16:35:32 -05:00
Zachary Anderson
c79fb5a400 [Android] Extract the PluginRegistry from the FlutterActivity (flutter/engine#4393) 2017-11-30 11:05:55 -08:00
Chris Bracken
6ae141180c Use WindowPadding class to represent view insets (flutter/engine#4406)
This drops the ViewInsets class in favour of the existing WindowPadding
class for representing the view insets.
2017-11-30 10:47:14 -08:00
Chris Bracken
5b3d343de6 Expose Window.viewInsets in dart:ui (flutter/engine#4403)
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.
2017-11-29 16:27:15 -08:00
Ben Konyi
3e17abfaf5 Updated sky directory to compile on Windows. (flutter/engine#4399) 2017-11-29 18:53:48 -05:00
Jason Simmons
59c2536d34 Set a pending dimension change in the animator only if the viewport's physical width/height changed (flutter/engine#4400)
Fixes https://github.com/flutter/flutter/issues/13183
2017-11-29 10:55:45 -08:00
Ben Konyi
76cf72a8c3 Added Semaphore implementation for Windows. (flutter/engine#4396) 2017-11-29 13:41:49 -05:00
Alexander Aprelev
35acd03c15 Run frontend server from temp directory to force absolute URIs in Kernel file. (flutter/engine#4394)
* Run frontend server from temp directory to force absolute URIs in Kernel file.

* Create special directory to cwd into to avoid conflicts with app sources in temp folder

* Make variable final
2017-11-28 13:58:51 -08:00
ethanblake4
955b41aaba Fix: use firstRequestedOrientation in fallthrough case (flutter/engine#4392) 2017-11-27 00:09:56 -08:00
P.Y. Laligand
b97185b2ca [fuchsia] Updated path to package template. (flutter/engine#4390) 2017-11-22 18:57:26 -08:00
amirh
f3d45b017c More informative error message for image decoding failure. (flutter/engine#4389) 2017-11-22 17:11:53 -08:00
amirh
8b0815d5de Remove target-os specific gclient dependencies. (flutter/engine#4374)
As we anyway always recommend to set the target_os to android.
Also if you happen to not set the target_os to android it messes up the licenses script output.
2017-11-22 15:55:09 -08:00
Sigurd Meldgaard
2338eae934 Move texture registry to platform view (flutter/engine#4388)
* Move texture registry ownership to platform view

This enables the texture registry to survive activity pause on Android.

* Remove debug info

* Formatted

* Set texture registry on initial rasterizer

* Remove unneccessary std::move
2017-11-22 14:39:03 +01:00
Sigurd Meldgaard
f3bf571559 Revert "Move texture registry ownership to platform view (#4348)" (flutter/engine#4387)
This reverts commit 2c2ddf97d3.
2017-11-22 14:12:25 +01:00
Sigurd Meldgaard
2c2ddf97d3 Move texture registry ownership to platform view (flutter/engine#4348)
* Move texture registry ownership to platform view

This enables the texture registry to survive activity pause on Android.
2017-11-22 09:55:45 +01:00
Alexander Aprelev
eca8948a88 Turn off smart minimal IKG compilation (flutter/engine#4383) 2017-11-21 16:09:41 -08:00
Chris Bracken
348fff3dd4 Catch divide-by-zero errors early in license tool (flutter/engine#4382)
If Progress is instantiated with a max of 0, throw immediately to avoid
a divide-by-zero later in toString(). This typically happens if the tool
recurses over an empty top-level component, which can happen when a
component is moved around in the repo and the developer hasn't cleaned
up old empty directories from their git client.
2017-11-21 15:42:17 -08:00
Chris Bracken
2aad4c763e Minor formatting fix in license script (flutter/engine#4381)
Fixes an errrant tab and unnecessary braces.
2017-11-21 15:34:13 -08:00
amirh
353f9063f4 Use a synchronous completer in _futurize. (flutter/engine#4379)
This keeps the futures chain shorter.
2017-11-21 15:31:04 -08:00
Zachary Anderson
2db5ec9775 Roll Dart to 3ee0a4284203ebc6991c78054583a7c02dc8faf9 (flutter/engine#4378) 2017-11-21 12:16:34 -08:00
Martin Kustermann
9f29a0f744 Enable flutter engine to also work with .*so files on android (flutter/engine#4298)
* Enable flutter engine to also work with .*so files on android

We would like to be able to use native tools (e.g. simpleperf, gdb) with
precompiled flutter apps.  The native tools work much better with *.so
files instead of the custom formats the Dart VM uses by default.

This CL adds support for being able to load the flutter app from an *.so
file on Android.

* Add sanity check to ensure we have either shared library or instruction snapshot (but not both)
2017-11-21 13:14:50 +01:00
amirh
b11a529c91 Delete the native implementation for ui.decodeImageFromList. (flutter/engine#4375)
The new ui.Codec API is a superset of the implementation in
image_decoding.cc. While we are not using ui.decodeImageFromList in the
framework anymore, we keep the dart function for backward compatability, and
just make it a thin wrapper around the codec API.
2017-11-20 14:42:42 -08:00
Chris Bracken
dc4ecd943b Use iOS scale when computing render buffer size (#4171) (flutter/engine#4373)
When checking whether render buffer size has changed, apply the device
scale factor used to convert points to pixels to ensure we're not
needlessly re-allocating render buffer storage.

Adds trace + debug log to make this easier to detect in future.

Originally introduced in 72c28f3a01, but
rolled back in d539abd7c5 to test whether
it was responsible for regressions to
flutter_gallery_ios__transition_perf benchmarks:
  * average_frame_build_time_millis
  * missed_frame_build_budget_count

Re-landed in 1a7ca91e39, and reverted in
79b9bdbbf4 after it appeared to regress
the above two benchmarks. After recent changes to microtask execution
order which fixed https://github.com/flutter/flutter/issues/9998,
re-introducing this fix results in benchmark improvements to the above
two benchmarks in local testing.
2017-11-20 14:15:26 -08:00
Sigurd Meldgaard
75ba5f9a2e Avoid double retain of Texture on ios. (flutter/engine#4354)
The "raw" pointer is already managed by ARC.
2017-11-17 13:49:57 +01:00
amirh
6f728c4150 add ui.Codec and ui.FrameInfo constructors to the dart_vm_entry_points.txt (flutter/engine#4371) 2017-11-16 16:49:20 -08:00
Zachary Anderson
3d346b67fc Roll Dart back to 4dd4fd745e588eef64b8d85811d847ab72633cb7 (flutter/engine#4370) 2017-11-16 09:24:13 -08:00
Martin Kustermann
84bad5cf45 Make frontend_server depend on dart/pkg/* files (flutter/engine#4369)
It speeds up local development workflow when doing changes to the front end
when ninja automatically rebuilds the frontend_server.dart.snapshot.
2017-11-16 15:34:23 +01:00
Jason Simmons
d396b92cc8 Removed unused declaration of Animator::RequestDrawOnVSync (flutter/engine#4367) 2017-11-15 17:44:46 -08:00
amirh
587c8f2344 Enable WebP (flutter/engine#4359) 2017-11-15 16:49:50 -08:00
Ian McKellar
ce4849d743 Allow Flutter apps on Fuchsia to shut down cleanly (flutter/engine#4366)
The UIDartState is now always owned by the isolate and always freed in
the isolate cleanup callback.

In the isolate shutdown callback, if the isolate being shut down is the
main isolate, the RuntimeController is informed which in turn notifies
the RuntimeHolder and thus the ApplicationControllerImpl. The
ApplicationControllerImpl tears down the whole Flutter application.

This fixes Fuchsia bug: MI4-328
2017-11-15 13:28:21 -08:00
Zachary Anderson
cb46299d06 Roll Dart forward (flutter/engine#4363) 2017-11-15 13:17:10 -08:00
Brian Osman
1d2ad93157 Prevent Skia from trying to use stencil buffers (flutter/engine#4362)
Fixes flutter/flutter#13018

When linear blending was disabled, we started rendering directly to FBO0 again. We can't attach stencil there, and the profile graph code triggers a path that (by default) uses it. This option forces us to use alternate rendering methods.

Note that the graph rendering code is constructing a fairly complex path. It would probably be much faster to render as a simpler series of drawRect calls for each box (which would get batched inside Skia).
2017-11-15 13:10:56 -05:00
Chinmay Garde
90988d60e1 Allow embedders to respond to platform messages from the Dart application. (flutter/engine#4361)
This updated the native embedder API in a non-ABI breaking way.
2017-11-14 15:51:19 -08:00
Brian Osman
59fc5fe74f Disable linear blending, use SkColorSpaceXformCanvas instead (flutter/engine#4355)
This retains gamut correction (adjusting colors for screens with different capabilities), but does all blending and interpolation with sRGB-encoded values. That matches the behavior expected by most users, as well as the behavior of nearly all other systems. It also greatly simplifies the EGL code.

A future Skia change will make this behavior more of a first-class citizen, so some of these implementation details will change again, but the behavior will not. The bulk of this change (elimination of complication from the GL surface code) is permanent - it's just the SkColorSpaceXformCanvas that will be replaced.
2017-11-14 13:33:26 -05:00
Zachary Anderson
cfef71d946 [Android] Cleanup in FlutterActivityDelegate (flutter/engine#4357) 2017-11-13 14:13:04 -08:00
Zachary Anderson
69f6500182 View destroy listener (flutter/engine#4347)
[Android] Allow persisting a FlutterNativeView across activities.
2017-11-13 13:56:48 -08:00
Jason Simmons
63b797fd55 Delete the native view when destroying the FlutterView (flutter/engine#4356)
Fixes https://github.com/flutter/flutter/issues/12996
2017-11-13 13:16:48 -08:00