428 Commits

Author SHA1 Message Date
Andrew Wilson
15b76dd33c Make window metrics doubles to reduce rounding issues. 2018-06-18 09:43:30 -07:00
Chinmay Garde
93c47a14ff
On snapshot, perform a device to host transfer for images resident on the GPU. (#5538) 2018-06-14 18:04:13 -07:00
Jason Simmons
c3c40cf958
Lazily load fonts that are embedded within the application (#5533)
Previously the engine would load all embedded fonts listed in the app's
font manifest during startup.  This change creates a Skia font manager that
is backed by the engine's AssetManager and can load embedded font assets
on demand.
2018-06-14 16:13:56 -07:00
Jason Simmons
efd6663344
Maintain a FontCollection for each engine instance instead of a process-wide singleton (#5521) 2018-06-13 14:28:21 -07:00
Ben Konyi
8d8d91bfc3
IsolateNameServer reland (#5519)
* Reland "Added IsolateNameServer functionality (#5410)"

This reverts commit c3976b3c7183f479717bffed3f640fb92afbd3dc.

* Fixed issue with isolate_name_server_test which caused test to timeout

* Disabled thread_annotations on Android as they aren't supported in the
NDK headers for std::mutex. Readded thread annotations to
IsolateNameServer.
2018-06-13 11:57:10 -07:00
Ben Konyi
c3976b3c71
Revert "Added IsolateNameServer functionality (#5410)" (#5516)
This reverts commit 61a2d129cfc8c52cf1ff59b03bccf67d9b07af63.
2018-06-12 17:03:13 -07:00
Ben Konyi
61a2d129cf
Added IsolateNameServer functionality (#5410)
* Added IsolateNameServer functionality, which allows for the association
of string names with isolate SendPort ids that can be used to establish
inter-isolate communications.
2018-06-12 15:50:48 -07:00
Dan Field
3b1f381cc5
Expose approximateBytesUsed for Picture (#5378) 2018-06-12 15:34:23 -04:00
Dan Field
d33bbff470
make analyzer happy (#5499) 2018-06-10 12:47:14 -04:00
Dan Field
8f023c5dac
Allow custom foreground paint to be used for drawing text (#5395)
* Allow specifying the foreground paint

* fix typo

* doc update

* call paint.reset
2018-06-10 00:21:18 -04:00
Stanislav Baranov
d4f5ef65a2
Support for saving Dart compilation trace on device. (#5443)
Support for saving Dart compilation trace on device.
2018-06-08 15:26:29 -07:00
Greg Spencer
5d2f24aa5c
Fixing image encoding format conversion. (#5489)
On a Linux host, we were having to convert the type of the bitmap to N32, but we weren't also fixing the channel order to RGBA, so consequently we were getting BGRA when the API was asking for RGBA. This forces the color format to be RGBA when that is what is asked for.

We weren't needing to do conversion on macOS, so macOS was always getting RGBA.
2018-06-07 18:06:47 -07:00
Greg Spencer
fca976d8c7
Fix animation diagram identifiers (#5481)
I forgot that the identifiers need to be unique per page for the animation tags.
This makes them unique.

Doc change only, no code.
2018-06-06 16:15:13 -07:00
Greg Spencer
7ec4b6115d
Add diagram links for StrokeJoin and StrokeCap (#5456)
This updates the documentation for StrokeJoin and StrokeCap to contain animated diagrams that describe their function. The actual diagrams reside in the assets-for-api-docs repo.
2018-06-06 14:10:52 -07:00
Alexander Aprelev
a83b37d35a
Roll dart to a5e41681e55d1e74684bfff530218db556d77ee8 (#5467)
* Roll dart to a5e41681e55d1e74684bfff530218db556d77ee8.

* Update license
2018-06-05 08:35:44 -07:00
Greg Spencer
6bfd413bee
Synchronizes analysis_options.yaml files, and turns on Function typedef lint. (#5419)
Addresses flutter/flutter#18028 for the engine repo, and synchronizes the analysis_options.yaml files between the engine and the flutter/flutter repo.
2018-05-30 16:06:05 -07:00
Michael Goderbauer
8a69d7f7ac
Add toString to WindowPadding (#5375) 2018-05-29 14:16:17 -07:00
Yegor
3d213f5548
remove the no longer used children parameter (#5333) 2018-05-22 12:44:42 -07:00
Todd Volkert
dee0a224ac
Support single-argument signature in Canvas.scale() (#5334) 2018-05-22 12:10:38 -07:00
Yegor
f876bd5710
split children into two ordered lists: traversal and hit test (#5091)
* split `children` into two ordered lists: traversal and hit test

* address comments

* reduce node object byte size

* link to DebugSemanticsDumpOrder
2018-05-21 17:44:23 -07:00
liyuqian
eacf06793c
Add debug asserts to using SkVertices::Builder (#5292)
Fixes flutter/flutter#9226
2018-05-18 10:32:56 -07:00
Greg Spencer
05a1687cf6
Moving assets-for-api-docs links to point to new asset dir. (#5296)
No logic changes, only links in doc comments.
2018-05-18 08:56:34 -07:00
Dan Field
0a74ef48f2
TwoPointConicGradients again (#5299)
* update docs for getBounds

* Add computeMetrics suggestion

* better explanation

* Support for TwoPointConical gradients
2018-05-18 07:43:52 -04:00
Alexander Aprelev
4a7940075c
Revert "Support for TwoPointConical gradients (#5275)" (#5293)
This reverts commit 919e8c211f518f17dbd298d9f8e39091b9e3897f as it
breaks flutter gradient_test.
2018-05-17 14:10:19 -07:00
Dan Field
ef0915c106
update docs for Path.getBounds (#5261)
* update docs for getBounds

* Add computeMetrics suggestion

* better explanation
2018-05-17 07:02:28 -04:00
Dan Field
919e8c211f
Support for TwoPointConical gradients (#5275) 2018-05-16 19:27:44 -04:00
Matan Lurey
be6c51735c
Fix documentation mistake in painting.dart (#5236)
s/`[red]`/_correct color_.
2018-05-15 08:00:30 -07:00
Jason Simmons
bff0e0d597
Allow Canvas.saveLayer without bounds (#5240)
Fixes https://github.com/flutter/flutter/issues/17497
2018-05-11 15:18:35 -07:00
Ben Konyi
39c02c4dc9
Fixed Windows build after Blink removal (#5230) 2018-05-10 17:21:12 -07:00
Jason Simmons
4a4cff96d4
Remove Blink code (#5218)
Fixes https://github.com/flutter/flutter/issues/12212
2018-05-10 15:57:29 -07:00
Jason Simmons
11d50441a6
Provide an SkPaint that describes the background of a text style (#5153)
Fixes https://github.com/flutter/flutter/issues/11961
2018-05-09 11:36:52 -07:00
Alexander Aprelev
9e4c5d0e1f
Roll dart sdk to e6d7d67f4b35556805dd083fed15bf3ed41f7e33. (#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
Yegor
d5c1117170
Roll dart to 011676641a8b4b77bb372384c712709cbf037675 (#5146)
* Roll Dart to 011676641a8b4b77bb372384c712709cbf037675.

Reverts b6be9377c58c488afea042a1b0ed8910b158c319 and uses Dart_NewExternalTypedDataWithFinalizer.

* update license goldens
2018-05-01 17:45:38 -07:00
Ryan Macnak
2812ea3ed3
Define Uri.base as CWD to match the standalone Dart VM. (#5137)
Bug: https://github.com/flutter/flutter/issues/17118
2018-05-01 09:30:30 -07:00
Chinmay Garde
110bce4fde
Use the GPU object constructor to create a gradient shader. (#5136)
Fixes build break introduced in 33aaf6fc2f9185aff37683ceaa5c66ec4ea9f916.
2018-04-30 17:06:59 -07:00
Victor Choueiri
33aaf6fc2f Enable sweep gradients (#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
cf91f89c84
Adding Color.alphaBlend (#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
Chinmay Garde
4d106f8520
In case of empty Dart data responses, don’t call the buffer method on null. (#5114)
Fixes regression introduced in https://github.com/flutter/engine/pull/5101.
2018-04-27 15:22:16 -07:00
Jason Simmons
b6be9377c5
Create message response external typed data objects as Uint8Lists (#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
Dan Field
c249b7026f Path metrics/getBounds/combinations again (#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
Jason Simmons
8da9398ed3
Throw an exception if a secondary isolate tries to send a platform message (#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
Ryan Macnak
a20fd83039
[fuchsia] Remove dead package file generation from core snapshots. (#5071) 2018-04-24 09:33:52 -07:00
Chinmay Garde
79b9ffb14b
Fixup Fuchsia content handler post shell refactor. (#5072) 2018-04-23 20:16:01 -07:00
Yegor
ec611470b5
replace nextNodeId/previousNodeId with hitTestPosition (#5066) 2018-04-23 16:16:17 -07:00
Jason Simmons
2970c099f7
Use the default microtask scheduler on all isolates except the UI isolate (#5068)
See https://github.com/flutter/flutter/issues/16846
2018-04-23 15:02:19 -07:00
Todd Volkert
cb3376c5de
Support different encodings in Image.toByteData() (#5060)
Fixes https://github.com/flutter/flutter/issues/16635
2018-04-20 19:47:27 -07:00
Michael Goderbauer
995633ef49
Add SemanticsFlag.isHidden (#5052) 2018-04-20 10:37:02 -07:00
Jonah Williams
3405e23a32
AccessibilityBridge support for edge triggered semantics (iOS + Android) (#4901)
AccessibilityBridge support for edge triggered semantics (iOS + Android)
2018-04-19 11:14:47 -07:00
Brian Osman
388f019961 Enable downscale of very large images when uploading on IO thread (#5011) 2018-04-18 18:00:00 -07:00
Jason Simmons
7a6b77999f
Remove the weak pointer factory from the service isolate's DartIsolate object (#5041)
The WeakPtrFactory must be deleted on the thread where it was created.
However, the service isolate is created and destroyed on threads from
the Dart thread pool, and the creating thread may not be the same as
the destroying thread.
2018-04-18 13:02:19 -07:00