285 Commits

Author SHA1 Message Date
amirh
b6aee8256f
Use a synchronous completer in _futurize. (#4379)
This keeps the futures chain shorter.
2017-11-21 15:31:04 -08:00
amirh
dcf2b78a6f
Delete the native implementation for ui.decodeImageFromList. (#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
amirh
5afc1e2848
Enable WebP (#4359) 2017-11-15 16:49:50 -08:00
Ian McKellar
d917c35e72
Allow Flutter apps on Fuchsia to shut down cleanly (#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
Brian Osman
0a7155d4e1
Disable linear blending, use SkColorSpaceXformCanvas instead (#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
amirh
6b5d8c99d2
Load animation frames to GPU textures from the IO thread (#4352) 2017-11-10 12:52:32 -08:00
Greg Spencer
130af88fde
Adding Rect.expandToInclude and Rect.longestSide (#4309)
Adding Rect.expandToInclude and Rect.longestSide to make the Rect API more symmetric.
2017-11-09 16:37:21 -08:00
amirh
c1b5e06cb2
expose a Duration object from ui.FrameInfo (#4345) 2017-11-09 14:03:19 -08:00
amirh
2920d61a5c
Make the public ui.Codec API Future based instead of callback based. (#4341) 2017-11-09 09:56:36 -08:00
Chris Bracken
bc2acf7bdd
Revert "Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5 (#4331)" (#4340)
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 8ad42f0dae3cb1267c2b9ab99db80e4696ddbc3d.
2017-11-08 16:48:00 -08:00
Chris Bracken
8ad42f0dae
Roll Fuchsia buildtools to 85907c59e97527d79bbfdfd849d8e85c24959cc5 (#4331)
* 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.
2017-11-08 11:18:17 -08:00
amirh
179bd4a799
Implement a SingleFrameCodec and return it for non animated images (#4329) 2017-11-07 14:07:02 -08:00
amirh
d8a0dd2958
Decode animation frames and pass FrameInfos to dart (#4324)
https://github.com/flutter/flutter/issues/204
2017-11-06 10:36:02 -08:00
amirh
05b00b1e14
Followup on post-merge comments for 941ed76bc (#4321) 2017-11-03 11:44:23 -07:00
amirh
941ed76bcd
Initial implementation of ui.Codec (a wrapper for SkCodec) (#4318)
This is the first step to support animated GIFs: flutter/flutter#204

TBD in following CLs:
 * Implement Codec.getNextFrame.
 * Add Framework side support to run animations.
2017-11-02 17:56:44 -07:00
Michael Goderbauer
60b6780056
Add isTextField and isFocused flags for iOS (#4316) 2017-11-02 16:02:16 -07:00
Zachary Anderson
9463b32b23
Reland: [GN] Don't set dart_host_toolchain (#4314) 2017-11-02 10:04:06 -07:00
Chinmay Garde
9a960f82f5 Add texture support (eg video, camera) (#4159) 2017-11-02 10:57:29 +01:00
Mikkel Nygaard Ravn
b41511e9a5
Revert "[GN] Don't set dart_host_toolchain (#4308)" (#4310)
This reverts commit 4caa68b8a061595ccdd8de17b530584604947b79.
2017-11-02 09:09:15 +01:00
Zachary Anderson
4caa68b8a0
[GN] Don't set dart_host_toolchain (#4308) 2017-11-01 13:36:18 -07:00
Michael Goderbauer
88cf09ffe6
Identify text fields as such to a11y on Android (#4299)
* Identify text fields as such to a11y on Android

* Add focus flag
2017-11-01 12:59:03 -07:00
Jason Simmons
fd478815c6
Validate UTF-16 input in ParagraphBuilder::addText (#4300)
Fixes https://github.com/flutter/flutter/issues/12772
2017-11-01 11:26:01 -07:00
Ian Hickson
afd4229653
Add TextPosition.== and hashCode, and some text API docs (#4283) 2017-10-31 10:39:44 -07:00
Michael Goderbauer
4a9e6782a7 Announce the correct new value after increase/decrease has been performed on iOS (#4282) 2017-10-25 16:02:43 -07:00
P.Y. Laligand
f339b2fbb4 [fuchsia] Account for the new Dart toolchain. (#4271) 2017-10-24 21:30:40 -07:00
xster
28e08053e2 Add luminance getter to Color (#4252)
* add luminance getter to color

* tests

* nit
2017-10-24 18:39:54 -07:00
Jason Simmons
054a2cca35 libtxt: some cleanup (#4268)
* rename glyph_position_x to glyph_lines
* use round instead of roundf
* return a range start/end struct in Paragraph::GetWordBoundary
2017-10-23 17:18:00 -07:00
Michael Goderbauer
91071f817b Support for accessibility label and hint (#4264)
* Support for accessibility label and hint

* review comments
2017-10-23 16:46:01 -07:00
P.Y. Laligand
419ee7c355 Update the location of Flutter packages. (#4257) 2017-10-20 14:25:49 -07:00
amirh
90f4664587 Add isButton to SemanticsFlags.values (#4258) 2017-10-20 14:23:40 -07:00
amirh
3d013382e6 Add a semantic isButton flag (#4254)
https://github.com/flutter/flutter/issues/11992
2017-10-20 13:15:20 -07:00
Ian Hickson
b15fa9c64e Document the Porter-Duff operators. (#4250) 2017-10-20 10:03:19 -07:00
Ian Hickson
1e21ac3fb7 Documentation improvements - RTL and others (#4248) 2017-10-19 17:30:30 -07:00
P.Y. Laligand
6fcb45991d Move //dart to //third_party/dart. (#4245) 2017-10-19 01:20:38 -07:00
Jason Simmons
e50693b19c Export the SkClipOp argument in Canvas.clipRect (#4243) 2017-10-18 16:39:19 -07:00
Yegor
23f5ccd25c Add alwaysUse24HourFormat and textScaleFactor (#4202)
* systems/settings channel split

* merge textScaleFactor and alwaysUse24HourFormat into flutter/settings channel

* add debugOverrideAlwaysUse24HourFormat

* implement textScaleFactor on iOS

* address comments

* remove debugOverrideAlwaysUse24HourFormat

* clang-format
2017-10-18 16:13:43 -07:00
Siva
5003703330 Fix for issue 12526 (#4218)
* Fix for issue 12526

Ensure that child isolates do not clear the dart_ui_state_ field present in the dart controller.

The commit dd1e0b59ec implemented code to reset the dart_ui_state_ back to null when an isolate was being shutdown to ensure there was no use after free issues when the main isolate exeutes Isolate.current.kill() it however it was also clearning the field when a child isolate was shutdown causing SEGVs later.

* Address code format issues.
2017-10-17 14:47:09 -07:00
Chinmay Garde
f1d3d84ffe Expose SkPath::arcTo and SkPath::rArcTo to Dart. (#4222) 2017-10-17 13:53:12 -07:00
P.Y. Laligand
5fae5d52cf Allow the project to be mapped to a location other than //flutter. (#4203)
This is for Fuchsia where we would like it to be located at //third_party/flutter.
2017-10-13 17:00:58 -07:00
Jason Simmons
6f4eb92020 libtxt: support the use_test_font flag required by framework tests (#4216)
This registers a test font manager that maps all fonts to the Ahem font
2017-10-13 11:31:35 -07:00
Jason Simmons
bcf606afee Remove unnecessary assert in drawAtlas (#4213)
Fixes https://github.com/flutter/flutter/issues/12513
2017-10-13 11:31:24 -07:00
Jason Simmons
b3167a06d5 Remove use of a SceneBuilder member after deletion (#4209)
ClearDartWrapper will delete this SceneBuilder, causing deletion of the
LayerBuilder
2017-10-12 13:50:17 -07:00
Jason Simmons
b84e114b8b libtxt: fix some typos (#4206) 2017-10-12 11:51:50 -07:00
Chinmay Garde
0b8efb62a6 Make flow::LayerBuilder virtual and plug in the default layer builder. (#4199) 2017-10-11 16:26:18 -07:00
Jason Simmons
199620a57b libtxt: support right-to-left text (#4198) 2017-10-11 16:15:57 -07:00
Chinmay Garde
1793f494a3 Move layer tree construction into flow::LayerBuilder so alternate builders can be plugged in. (#4197) 2017-10-11 12:25:55 -07:00
Alexander Aprelev
a91e7b0c8b Revert "Change kernel platform generation dependency name (#4189)" (#4192)
This reverts commit 83224fb6012c893b78c75e87184d3877c088394a.
2017-10-10 13:34:28 -07:00
Alexander Aprelev
83224fb601 Change kernel platform generation dependency name (#4189)
* Change kernel platform generation dependency name

* Include vmservice which is needed by gen_snapshot for Flutter release build
2017-10-10 13:24:04 -07:00
Alexander Aprelev
a9390e6fdc Revert "Revert "Roll dart to pick up change where platform.dill was removed (#4180)" (#4185)" (#4186)
This reverts commit a89f46696d4bc16d814f6697f46e9514b1193b0e.

Doing the synchronized roll of Dart into engine as well as into Fuchsia
to prevent Fuchsia breakage.
2017-10-09 11:18:59 -07:00
Adam Barth
a89f46696d Revert "Roll dart to pick up change where platform.dill was removed (#4180)" (#4185)
This reverts commit 37f571ee09b24f0248e3ab5d530acdb8ec2db018.
2017-10-09 09:13:13 -07:00