3606 Commits

Author SHA1 Message Date
Jason Simmons
b0d9893494 Allow Canvas.saveLayer without bounds (flutter/engine#5240)
Fixes https://github.com/flutter/flutter/issues/17497
2018-05-11 15:18:35 -07:00
Jonah Williams
984b70e6ad swap brightness definition on iOS to match android (flutter/engine#5239) 2018-05-11 14:01:29 -07:00
Jason Simmons
4ff9861d43 Re-land "libtxt: exclude trailing whitespace from right-justified lines" (flutter/engine#5234)
If a line is right justified, then remove any trailing whitespace from the
text range given to Minikin.  Right justification shifts the line's glyphs
by the layout advance computed by Minikin, and this advance should exclude
whitespace so that the last visible character will be flush with the right
margin.

Also exclude trailing whitespace from center justified lines.

Fixes https://github.com/flutter/flutter/issues/17502
Fixes https://github.com/flutter/flutter/issues/16333
2018-05-11 12:17:31 -07:00
skia-flutter-autoroll
55ebf10053 Roll src/third_party/skia/ 1d686a962..811b944a8 (25 commits; 5 trivial rolls) (flutter/engine#5237)
Auto-roller completed checks. Merging.
2018-05-11 14:55:59 -04:00
Jason Simmons
6431f174d4 Detach from JNI before exiting the GPU thread. (flutter/engine#5231)
The GPU thread calls into Java via JNI in order to update external textures.

Fixes https://github.com/flutter/flutter/issues/17329
2018-05-11 11:42:19 -07:00
Todd Volkert
a911ad0a97 Revert ad4771c35f3a36a69c0b777abff993fa5ab398a4 (flutter/engine#5233)
In introduced a regression in text layout: https://github.com/flutter/flutter/issues/17502
2018-05-10 23:50:19 -07:00
Ben Konyi
4ef87176ae Fixed Windows build after Blink removal (flutter/engine#5230) 2018-05-10 17:21:12 -07:00
Jason Simmons
67381c0c35 Remove Blink code (flutter/engine#5218)
Fixes https://github.com/flutter/flutter/issues/12212
2018-05-10 15:57:29 -07:00
Todd Volkert
99d48aab30 Bypass the raster cache when screenshotting (flutter/engine#5227)
Fixes https://github.com/flutter/flutter/issues/17448
2018-05-10 12:32:17 -07:00
Ryan Macnak
4f023940cd [fuchsia] Add dependencies needed to build the test shell. (flutter/engine#5216) 2018-05-09 13:43:27 -07:00
Jason Simmons
540616b4da libtxt: in GetRectsForRange, add placeholders only for newline characters (flutter/engine#5157)
If the range passed to GetRectsForRange includes a newline character, then
the framework expects to see a rectangle representing the newline so it knows
where to position the cursor at the end of the line.

If the range covers other non-printing characters but not the newline, then
GetRectsForRange should not produce a rectangle for the line.
2018-05-09 11:42:44 -07:00
Jason Simmons
a45e210692 Provide an SkPaint that describes the background of a text style (flutter/engine#5153)
Fixes https://github.com/flutter/flutter/issues/11961
2018-05-09 11:36:52 -07:00
Chinmay Garde
47d04deb99 Read/apply settings that apply process wide before creating any shell components. (flutter/engine#5203) 2018-05-08 11:56:31 -07:00
Chinmay Garde
1add7581f0 Allow explicit specification of the isolate snapshot. (flutter/engine#5193)
The mobile shells all use the same isolate snapshot. This is also the snapshot used by the service isolate. This works towards a world where the isolate snapshot is no longer a member variable of the DartVM instance. Instead, all snapshots must be specified in the run configuration. For now, the new `Shell::Create` overload will only be used by Fuchsia till I refactor `dart_vm.cc`.

There are no API updates to the mobile shells.
2018-05-07 17:28:31 -07:00
Jason Simmons
ad4771c35f libtxt: exclude trailing whitespace from right-justified lines (flutter/engine#5190)
If a line is right justified, then remove any trailing whitespace from the
text range given to Minikin.  Right justification shifts the line's glyphs
by the layout advance computed by Minikin, and this advance should exclude
whitespace so that the last visible character will be flush with the right
margin.

See https://github.com/flutter/flutter/issues/16333
2018-05-07 17:16:03 -07:00
Jason Simmons
ddb2f2ab8f libtxt: support fake italic text (flutter/engine#5191)
The text skew value is based on Blink's implementation.

Fixes https://github.com/flutter/flutter/issues/17351
2018-05-07 17:12:03 -07:00
Jonah Williams
e36f92ec65 Re-land Enables system chrome customization on Android O/N and greater (flutter/engine#5171) 2018-05-07 15:45:59 -07:00
Jason Simmons
dff05ac16e Use the rasterizer's compositor context and texture registry to capture screenshots (flutter/engine#5180)
Fixes https://github.com/flutter/flutter/issues/16412
2018-05-04 16:07:10 -07:00
Jonah Williams
92e3517650 add onStart hook which places flutter in an inactive state (flutter/engine#5177) 2018-05-04 14:46:57 -07:00
cary-clark
fc240c57ab rename obsolete SkColor.h macro (flutter/engine#5175)
change SkColorSetARGBInline to SkColorSetARGB. SkColorSetARGBInline is deprecated and will be deleted from Skia.
2018-05-04 13:44:44 -04:00
Jonah Williams
c2349b2245 Revert "Enables system chrome customization on Android O and greater" (flutter/engine#5167)
* Revert "Roll dart sdk to e6d7d67f4b35556805dd083fed15bf3ed41f7e33. (#5165)"

This reverts commit 75b94b4ea5307c723c6003b9d7a786ac3f22bce1.

* Revert "Enables system chrome customization on Android M/O and greater (#5112)"

This reverts commit f4136be0d552a5b7f1f8bfafc3c5da4a70dda190.
2018-05-03 15:38:25 -07:00
Jason Simmons
f96d87c349 libtxt: exclude soft break whitespace from line widths for right justification (flutter/engine#5166)
If a line has a soft break due to word wrap, the line width should not include
the width of the whitespace characters within the soft break.
2018-05-03 15:14:58 -07:00
Alexander Aprelev
75b94b4ea5 Roll dart sdk to e6d7d67f4b35556805dd083fed15bf3ed41f7e33. (flutter/engine#5165)
* Roll dart sdk to e6d7d67f4b35556805dd083fed15bf3ed41f7e33.

Changes since last dart roll:

```
e6d7d67f4b Revert 4f18af12c7c6d53f02cf32cb9b5ea848b86e1d77 as it causes test breakages.
4877587346 [GN] Uses dart_action.gni instead of compiled_action.gni.
4b89ba24fb Meta CHANGELOG markdown cleanup.
3d688deba7 Bump analysis server version to 1.20.2
0dc81ae4eb Publish package:meta 1.1.5
7e54844fe7 [vm] Fix build for gcc 7.3.0.
9d10a6ad4a Issue 33034. Fix statement completion with missing condition right parenthesis.
3fd2d5fb05 [vm] Use compiler warnings to insist callers check for errors from Dart_Invoke*/Load*/Compile*.
afb490adbc [dart:io] Provide modern Dart-styled constants
2929b71aa2 [kernel/vm] Address follow-up review comments for bytecode generation
73768a5342 General TypeInfo and IdentifierContext cleanup
e93b2ee250 Improve typedef identifier recovery
46a9ed0617 Added example about calling a tear-off with a wrong-shape argument list
0c839cf3f8 [fasta] Add 'as' expressions to the Forest API
16f6ce2fee [release] Prepare changelog for 2.0.0-dev.53.0
d13bf49870 Check type-variable bounds on generic methods
794fe1e14f Add stacktrace tests for synchronous async
fb779df11c [frontend-server] Disable depfile test on Windows.
```

* Adjust gn-scripts to accommodate 487758734695e7a701325b80178465ebbd0fafdd refactoring.
2018-05-03 15:05:50 -07:00
Jonah Williams
f4136be0d5 Enables system chrome customization on Android M/O and greater (flutter/engine#5112) 2018-05-03 13:10:44 -07:00
Alexander Aprelev
b76f2c6abc Roll dart to b298fc6d8f6a0e1aa841dbbdda26663d6012a79a. (flutter/engine#5155)
* Roll dart to b298fc6d8f6a0e1aa841dbbdda26663d6012a79a.

Changes since last roll:
```
b298fc6d8f Revert "[kernel] Change dill representation of doubles"
9a7e1f64a2 Revert "Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE.""
cbca4006f8 fix #30907, add library constants for all SDK libraries
61c226b4ea Only create Goma's analyzer on Linux.
24dd9b4176 Revert "Fix incorrect handling of NSM forwarders and pull all logic into CFE."
bed71b7776 Migrate and clean up the prefix negative tests.
1fcd896ed9 [VM] Avoid deadlock by allowing us to run kernel isolate from a script snapshot, fixes all dartk-sim* builders
0bc6e7217a Update expression compilation expectations.
9038b8f45f CFE support for compiling individual expressions in a context.
7d5025e814 Fix incorrect handling of NSM forwarders and pull all logic into CFE.
e2247e5e00 Put the '@' outside the revision variables.
9381424204 Fix presubmit on Windows. Dart executable is not called .bat
2a8c3515b2 Avoid strong+checked mode: strong mode supersedes checked mode
b7698dcbce Update status for Windows
8baa82413b [infra] Remove --no-preview-dart-2 flag from gardening tools
47e9039512 Don't encode strings up front; don't toString uris
4a0ac85cc3 Update co19 status
ce7329849d Fix build breakages - use platform independent path specification is test so that   it works on windows - skip test for precompiled and dartk builds as the test uses   spawnUri which is not supported in these modes
ee6351a147 [VM] Set up package config value when invoking the front end for compilation, this should fix issue 32950 "(Isolate.spawnUri() ignores packageConfig argument in Dart 2 mode.'
d1286a367e Strong mode update for swarm
fd27cc3435 Don't store bytes in the file cache.
73abd61304 Re-land "Clean up the use of deprecated API in the analyzer_plugin package".
607f4f5769 [vm] Get more helpful errors from Dart_SetVMFlags and Dart_MakeIsolateRunnable.
f044637c8b [infra] Upgrade checked in SDKs to 2.0.0-dev.52.0
dcf10816aa [infra] Add script that updates checked in SDKs
f8bea2a7e6 dart2js: Register inlined native methods for dump info
7fe8659613 dump-info: Use relative paths for library canonicalUri...
dcf4886500 [frontend-server] Add verbose option.
5087ffa481 [release] Move DDC sync-async flip to correct section in the release notes
fe7056ebaa [release] Update changelog for 2.0.0-dev.52.0
```

* Pick up another revert to fix https://github.com/flutter/flutter/issues/17214 and few more dart commits landed since:

```
4c9b712052 Revert "Don't encode strings up front; don't toString uris"
a1fbf62742 [build] Place 'extern "C"' before __attribute__, as required by gcc.
258c5172df [vm] Remove dart_mirrors_api.h.
384c55c29e Update dartdoc & dependencies to v0.19.0.
```

* fix licenses
2018-05-02 18:42:14 -07:00
Jonah Williams
8bac5d84be Add Android accessibility bridge support for "longPress" and "tap" semantic events 2018-05-02 17:24:29 -07:00
Yegor
37876134d9 Roll dart to 011676641a8b4b77bb372384c712709cbf037675 (flutter/engine#5146)
* Roll Dart to 011676641a8b4b77bb372384c712709cbf037675.

Reverts cb86a973a7c96bddf304f611b963064133a5cc8c and uses Dart_NewExternalTypedDataWithFinalizer.

* update license goldens
2018-05-01 17:45:38 -07:00
Ryan Macnak
4089df7bce Define Uri.base as CWD to match the standalone Dart VM. (flutter/engine#5137)
Bug: https://github.com/flutter/flutter/issues/17118
2018-05-01 09:30:30 -07:00
xster
fa659500dd Increase the GPU thread priority and add error logging (flutter/engine#5117) 2018-04-30 17:18:33 -07:00
Chinmay Garde
d9405b3004 Use the GPU object constructor to create a gradient shader. (flutter/engine#5136)
Fixes build break introduced in 3d2ae063e98721b31928752adade8e5ca01ef392.
2018-04-30 17:06:59 -07:00
Victor Choueiri
3d2ae063e9 Enable sweep gradients (flutter/engine#4950)
* Enable sweep gradients

* Use _matrix4IsValid

* Add assert for startAngle < endAngle

* Use radians for startAngle and endAngle

* Update AUTHORS

* Better assert on matrix4IsValid
2018-04-30 15:58:53 -07:00
Greg Spencer
4b03aacc53 Adding Color.alphaBlend (flutter/engine#5119)
This is helpful for some Material Design widgets, which are specified as a semi-transparent color over top of a "material". In some cases, the resulting alpha-blended color can be used instead of compositing an additional shape with an opacity.

This new Color.alphaBlend function mimics the alpha blending function, and creates the resulting combined color. The optimization only works for solid color shapes that have the same geometry, of course.
2018-04-30 15:20:29 -07:00
Ryan Macnak
cb8d6bb865 Roll Dart to 0cc70c4a7c448078dd2aea8e45c56bc50fbbb31c. (flutter/engine#5133) 2018-04-30 13:57:32 -07:00
Jason Simmons
d47e663efa Re-land "Hold a global reference to the AssetManager Java object backing the APKAssetProvider" (flutter/engine#5132)
Fixes https://github.com/flutter/flutter/issues/16222
2018-04-30 12:29:40 -07:00
Jason Simmons
8c9ef95bea Detach from JNI during shutdown of the UI thread on Android (flutter/engine#5120)
The APKAssetProvider will hold a reference to its Java peer
(see c2b081e229)

After dropping this reference, the UI thread must detach from JNI before exiting.
2018-04-30 10:44:01 -07:00
Chinmay Garde
bdaa00232e In case of empty Dart data responses, don’t call the buffer method on null. (flutter/engine#5114)
Fixes regression introduced in https://github.com/flutter/engine/pull/5101.
2018-04-27 15:22:16 -07:00
Yegor
2b58565cee Revert "Hold a global reference to the AssetManager Java object backing the APKAssetProvider (#5078)" (flutter/engine#5116)
This reverts commit c2b081e229eb3c1103d0d06f0c9d7057166ece1d.

It causes engine crashes in some Android Espresso tests.
2018-04-27 13:47:26 -07:00
Jason Simmons
cb86a973a7 Create message response external typed data objects as Uint8Lists (flutter/engine#5101)
PlatformMessageResponseDart will wrap large responses in Dart external typed
data objects in order to avoid copying the data into a new buffer.

Previously these objects were created with the Dart_TypedData_kByteData type.
A weak persistent handle is then associated with the ByteData to provide a
finalizer that deletes the raw buffer.  However, the Dart VM could call
finalizer on the ByteData even if references still existed to the Dart ByteBuffer
object backing the ByteData.  The ByteBuffer would then be referencing a deleted
raw buffer.

This PR prevents that scenario by creating a Dart_TypedData_kUint8 object,
attaching the finalizer to that object, and then wrapping it in a ByteData.
2018-04-26 17:49:51 -07:00
Jonah Williams
08d8e86ff1 Add tooltip method to Android AccessibilityBridge (flutter/engine#5103) 2018-04-26 15:03:47 -07:00
Jason Simmons
dd83413e52 libtxt: post-process glyph positions in order to accurately right-justify text (flutter/engine#5093)
Previously libtxt was applying right justification during line layout based on
the line width returned by the Minikin line breaker.  However, this width does
not include the width of leading or trailing whitespace.

So in a right justified line the starting offset of the first glyph would not
account for the advance of the leading whitespace, resulting in text being
clipped.

This PR applies line justification after the glyphs are laid out and the full
advance of the text is known.

Fixes https://github.com/flutter/flutter/issues/16333
2018-04-26 09:42:38 -07:00
Alexander Aprelev
7bbee90efb Set file modified callback. (flutter/engine#5096)
This fixes dart1 hot reload regression caused by 82c5c8fed.
2018-04-26 08:43:28 -07:00
Dan Field
4fc5359abc Path metrics/getBounds/combinations again (flutter/engine#4957)
* add path measure

* fix typo

* getBound and addPathWithMatrix

* Add myself to Authors, add PathOps

* fix linting issues

* update licenses_flutter to add new files

* Use matrix4 instead of matrix3 for consistency/interop

* put pubspec back

* fix bug in getSegment

* fix typo

* Add return value for PathOp

* refactoring from review

* refactoring from review - still TBD on computeMetrics()

* add doc

* lint issue

* fix computeMetrics, add Path.from

* add missing wireup for clone

* change PathMetrics to iterable, fix bug with angle on Tangent

* prefer std::make_unique

* cleanup docs

* add path measure

* fix typo

* getBound and addPathWithMatrix

* Add myself to Authors, add PathOps

* fix linting issues

* update licenses_flutter to add new files

* Use matrix4 instead of matrix3 for consistency/interop

* put pubspec back

* fix bug in getSegment

* fix typo

* Add return value for PathOp

* refactoring from review

* refactoring from review - still TBD on computeMetrics()

* add doc

* lint issue

* fix computeMetrics, add Path.from

* add missing wireup for clone

* change PathMetrics to iterable, fix bug with angle on Tangent

* prefer std::make_unique

* cleanup docs

* fix iterator bug

* remove unnecessary clone for computeMetrics

* fix some doc issues

* fix PathMeasure iterator, extendWithPath, isClosed, and pubspec.lock

* get rid of orElse; use StateException

* StateError, not StateException

* doc improvements and nits

* add unit tests, fix bugs found during testing

* fix two uncommited doc changes

* one more

* change sign of tangent angle, update docs

* update unit tests for inverted angle

* update tangent to include vector

* Doc fixes

* Fix MSVC compilation and unit test
2018-04-25 15:35:01 -07:00
Ben Konyi
e603014960 Initial plugin support for background downloads + content fetching (flutter/engine#5082)
* Added handleEventsForBackgroundURLSession and
performFetchWithCompletionHandler handlers in FlutterAppDelegate to
allow for plugins to perform background downloads and fetch small
amounts of data opportunistically.
2018-04-25 13:35:01 -07:00
Ryan Macnak
b8b7e8e829 [fuchsia] Changes for running Dart 2 on flutter_runner. (flutter/engine#5080)
- Remove assumption that we're in Dart 2 mode only if there's a platform kernel.
 - Load core snapshots from the package instead of linking them in.
2018-04-25 13:31:13 -07:00
Jason Simmons
13b1f11bfe Throw an exception if a secondary isolate tries to send a platform message (flutter/engine#5069)
Platform messages are only support in the UI isolate.  Secondary isolates
do not have a window that can receive incoming messages, and outgoing messages
are not tagged with a destination isolate and thus will always be dispatched
to the UI isolate.

Fixes https://github.com/flutter/flutter/issues/16846
2018-04-25 10:29:20 -07:00
Michael Goderbauer
890dd8c739 Roll Dart to 8d4074175fb95cd4da810b4bf652a956449bac37 (flutter/engine#5089) 2018-04-25 10:03:19 -07:00
Michael Goderbauer
fafddbcd6a Revert "Roll dart to 29d6e963702fcbb0ed0d5ca67d6b5f977ac0c328 (#5083)" (flutter/engine#5085)
This reverts commit efeed7c7174d8e3e05c5ae3793e6b26b77b4e64f.
2018-04-24 18:49:40 -07:00
Michael Goderbauer
efeed7c717 Roll dart to 29d6e963702fcbb0ed0d5ca67d6b5f977ac0c328 (flutter/engine#5083)
Picks up a fix for math on 32bit ARM devices running iOS, required for https://github.com/flutter/flutter/issues/2089.
2018-04-24 18:06:53 -07:00
Chinmay Garde
602b9b7c33 Add disabled failing test for floating point errors on matrix decomposition. (flutter/engine#5076) 2018-04-24 16:02:38 -07:00
Jason Simmons
c2b081e229 Hold a global reference to the AssetManager Java object backing the APKAssetProvider (flutter/engine#5078)
Fixes https://github.com/flutter/flutter/issues/16222
2018-04-24 15:50:52 -07:00