760 Commits

Author SHA1 Message Date
Dan Field
e47fa0bee9
Avoid using Dart_New for semantics (#16849) 2020-02-28 10:31:03 -08:00
Dan Field
c2fc31d19d
remove usage of Dart_New for paragraph/libtxt (#16837) 2020-02-28 00:15:40 -08:00
Ben Konyi
1e01b775e3
Enable HTTP and socket profiling dart:io service extensions for Flutter (#16800) 2020-02-27 08:29:58 -08:00
Miguel Beltran
d0c2418dfe
Add support for Increase Contrast on iOS (#15343) 2020-02-22 14:04:04 -08:00
Dan Field
c3f4c1a085
Migrate Path to AssociateWithDartWrapper (#16753) 2020-02-22 12:59:35 -08:00
Ryan Macnak
930a80ac86
Fix some compiler warnings in newer versions of Clang. (#16733) 2020-02-21 12:57:06 -08:00
Dan Field
e18aba3321
Refactor of ClaimDartHandle -> AssociateWithDartWrapper (#16720) 2020-02-20 17:31:03 -08:00
Dan Field
60b27fd545
Reland "Remove usage of Dart_AllocateWithNativeFields" (#16713) 2020-02-20 16:06:02 -08:00
vsmenon
0ef67b5e74
opt out dart:ui from nnbd (#16473)
* opt out dart:ui from nnbd

* Annotate tests as well
2020-02-20 11:04:00 -08:00
Dan Field
f2f8c342be
Revert "Remove usage of Dart_AllocateWithNativeFields from tonic (#16588)" (#16684)
This reverts commit 4941ff7bf608e0bca764e1edad769a3f8cca797f.
2020-02-19 10:00:05 -08:00
Ben Konyi
4941ff7bf6
Remove usage of Dart_AllocateWithNativeFields from tonic (#16588)
This API is being removed from the Dart SDK.
2020-02-14 13:55:38 -08:00
Francisco Magdaleno
e0ebaea590
Revert "Re-land: Use os_log instead of syslog on Apple platforms (#16549)" (#16558)
This reverts commit 6aacf5e76755feb8e0f791fa619cbd99a3bd5885.
2020-02-12 12:40:31 -08:00
Chris Bracken
6aacf5e767
Re-land: Use os_log instead of syslog on Apple platforms (#16549)
Migrates to using os_log for app logging on iOS 13 and above, macOS
10.11 and above. On older platform, fall back to syslog(), which is what
we used previously.

This re-lands commit 78a8909725bbaeec80870f498d01ea6e56932a3a with a fix.
That commit was reverted in a61dbf2f66b97e85f4d8bf0cfb29a8b3c2640c09.
2020-02-11 15:11:46 -08:00
Chris Bracken
a61dbf2f66
Revert "Use os_log instead of syslog on Apple platforms (#13487)" (#16546)
Looks like somehow the fix to move to static_cast didn't get merged.

This reverts commit 78a8909725bbaeec80870f498d01ea6e56932a3a.
2020-02-11 13:20:52 -08:00
Jenn Magder
78a8909725
Use os_log instead of syslog on Apple platforms (#13487)
Migrates to using os_log for app logging on iOS 13 and above, macOS
10.11 and above. On older platform, fall back to syslog(), which is what
we used previously.
2020-02-11 10:23:44 -08:00
Michael Goderbauer
e4f46f32f1
Doc fixes in BoxHeightStyle (#16424) 2020-02-07 13:41:50 -08:00
sjindel-google
c9322145f4
Ensure fields of Rect and OffsetBase classes are optimized as non-null. (#16465)
* Ensure fields of Rect and OffsetBase classes are optimized as non-null.

* Update web_ui and formatting
2020-02-07 19:06:20 +01:00
Gary Qian
b98a39e0bb
Add docs (#16368) 2020-02-04 13:53:02 -08:00
Chinmay Garde
f7b78e001d
Remove all uses of the redundant flutter_root variable. (#16311)
This was only necessary when the Engine had to build in multiple buildroots
where the sources where checked out at different paths relative to the
buildroot. This is no longer the case and there are already cases GN rules
have been written that mix and match variable usage with the direct
specification of the path to the Flutter sources relative to the sole buildroot.
2020-01-31 21:49:48 -08:00
Kaushik Iska
74930e4212
[fuchsia] Fix the import for dart_api.h (#16269) 2020-01-30 14:55:15 -08:00
Kaushik Iska
9361ee5e6b
[fuchsia] SceneHostBindings are no longer thread locals (#16262)
Prior to this change SceneHostBindinds was a ThreadLocal but the
intention was for it to be IsolateLocal. Given that dart
could collect this map on a non-UI thread this caused
use-after-free issues.

This change fixes it by making it keyed on isolate and koid
this is not the ideal solution, this would exist on
dart isolate group data struct. Given that Fuchsia is moving
to use the embedder API, the decision to use this temporary
work around was made.

fixes https://github.com/flutter/flutter/issues/49738
2020-01-30 14:36:36 -08:00
Gary Qian
ee297aa699
Reland "Engine/LibTxt/dart:ui impl of TextHeightBehavior #15087" (#16155) 2020-01-29 10:52:24 -08:00
Dan Field
53baa7aee5
Revert breaking PRs (#16148)
* Revert "Web PargraphStyle TextHeightBehavior integration (#16075)"

This reverts commit 86682a2d09e7d111a5c4fd2156b9971bd65fb693.

* Revert "Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087)"

This reverts commit cbf4536d158e25e372469c242e326c48cc730de7.
2020-01-28 10:40:05 -08:00
Gary Qian
86682a2d09
Web PargraphStyle TextHeightBehavior integration (#16075) 2020-01-27 17:35:40 -08:00
Gary Qian
cbf4536d15
Engine/LibTxt/dart:ui impl of TextHeightBehavior (#15087) 2020-01-27 13:37:11 -08:00
Chinmay Garde
276481c4d3
Move tonic into //flutter/third_party. (#15895)
Tonic used to be used by multiple consumers outside of Flutter Engine. Due to
this, it has an unnecessary abstraction layer as well as utilities duplicated in
FML and other engine subsystems. The sole user of Tonic is now the Flutter
Engine. It is intended that the Flutter Engine team now owns this subsystem,
remove unnecessary utilities and document the headers. This is the first step in
the transition. No history is being imported as the initial history was already
lost in the transition of this component to fuchsia.googlesource. As this
component was unmaintained there, I could see no additional value in importing
the history of the patches there.

No functional change. Just moved the repo from //third_party to
//flutter/third_party and updates GN refs.
2020-01-25 17:01:56 -08:00
Dan Field
89f3471fa7
the the fix (#15973) 2020-01-24 12:43:32 -08:00
Dan Field
5554fe1f3a
fix typo, update path metrics docs (#15715) 2020-01-17 10:02:59 -08:00
Dan Field
1970c0624d
implicit casts and add missing docs (#15698) 2020-01-16 17:03:33 -08:00
chunhtai
1f4c593032 loadfontfromlist should send fontchange message to framework (#14805) 2020-01-16 17:03:04 -08:00
Dan Field
85a8ac4255
Make internal cache vars private (#15699) 2020-01-16 16:10:25 -08:00
Sebastian Jeltsch
c7d0fb7879 More efficient decoding for down-sampled Flutter images using cache(Width|Height) (#15372)
When down-scaling images, decode encoded images into smaller images
closer to the target size before finally down-scaling them to their
target size. For very large images this can avoid inflating the image
into its full size first before throwing it away. This can help to
significantly reduce peak memory utilization.

On a tangent, we could be even more efficient, if we'd interpret the
cache(Width|Height) as sizing hints.

I also opportunistically added warnings, I don't think a "caching" API
should support scaling images up or changing their aspect ratio.
2020-01-16 10:13:04 -08:00
Chris Bracken
23df3e6bcb
Revert "Add support for on/off switch labels when built on iOS 13. (#12467)" (#15370)
Broke a fake implementation of Accessibility features in the framework.
While this change is unlikely to break any users in the wild, this is a
breaking change by the standards set out in our documentation and
should follow the breaking change announcement process. Details can be
found at https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes.

The error in question:

    Missing concrete implementation of 'getter AccessibilityFeatures.onOffSwitchLabels' • packages/flutter_test/test/window_test.dart:252:7 • non_abstract_class_inherits_abstract_member

This reverts commit d12f2a609635d18ee89547131ff0a11eca59266c.
2020-01-09 10:33:51 -08:00
brandondiamond
d12f2a6096 Add support for on/off switch labels when built on iOS 13. (#12467) 2020-01-08 18:26:44 -08:00
Jim Graham
929b1edff5
Engine support for ImageFiltered widget (#14491)
web_ui support coming in https://github.com/flutter/flutter/issues/47163
2019-12-19 16:47:08 -08:00
Jim Graham
22413efc48
Update formatting in web_ui scene bulder to match flutter style and dartfmt. (#14539) 2019-12-19 12:50:39 -08:00
Kaushik Iska
f2dbeb8aa7
Reland Wire up Opacity on Fuchsia (#14559)
This reverts commit 6ea69a0d4339dd153899bb6c299689f1dd43329d.

On top of the revert, it reverted a commit in the PR:
https://github.com/flutter/engine/pull/14024

This reverts commit ea67e5b0b930ebf552bc7dbd678a35ee6a129c39.
2019-12-18 16:05:38 -08:00
Kaushik Iska
6ea69a0d43
Revert "Wire up Opacity on Fuchsia, round 2 (#14024)" (#14543)
This reverts commit d117ac979c28363a0a6b02d4a54945212a88b6f9.
2019-12-18 10:29:47 -08:00
Lau Ching Jun
c327cae7ab
Revert "Fix off-by-one fromRGBO alpha value calculation (#13777)" (#14548)
This reverts commit 9f2daad6488ce5e7f3ca3f9a6a38b199b3791120.
2019-12-18 00:22:50 -08:00
Tomás Arias
9f2daad648 Fix off-by-one fromRGBO alpha value calculation (#13777)
Constructing colors using `fromRGBO` should return the same values as the CSS
`rgba()` notation.  rgba(0, 0, 255, 0.5) is the same as `#0000ff80`

However `fromRGBO` sometimes creates a color with an off-by-one alpha value:

    expect(Color.fromRGBO(0, 0, 255, 0.5), Color(0x800000ff));

Expected: Color:<Color(0x800000ff)>
  Actual: Color:<Color(0x7f0000ff)>

If we use `withOpacity` to create the same color, it returns the correct color:

    expect(Color.fromRGBO(0, 0, 255, 1).withOpacity(0.5), Color(0x800000ff));

This should also be changed in lib/web_ui/lib/src/ui/painting.dart in a
followup change.
2019-12-17 09:34:30 -08:00
Jason Simmons
bdd4e4d948
Do not assume that createTypeface is called before getStyle in the AssetManagerFontStyleSet (#14343) 2019-12-13 09:23:08 -08:00
Alexander Aprelev
0081e8c516
Remove unused _TypeNone enum field. (#14440)
* Remove unused field
* Similarly remove _TypeNone from web_ui
2019-12-12 09:43:44 -08:00
Dwayne Slater
80d80ff6e6
Add ability to control dithering on Paint (#13868) 2019-12-11 14:53:50 -08:00
Chinmay Garde
49d6552e76
Verify accounting for loop counts in Gif and WebP assets is consistent. (#14321)
Asserts that the Skia fix is pulled into Flutter Engine https://skia-review.googlesource.com/c/skia/+/259161. This should have happened in https://github.com/flutter/engine/pull/14315.

Fixes https://github.com/flutter/flutter/issues/46289
Fixes https://github.com/flutter/flutter/issues/45246
2019-12-10 20:04:15 -08:00
David Worsham
d117ac979c
Wire up Opacity on Fuchsia, round 2 (#14024)
* Remove erroneous ChildView opacity

* Wire frame metrics through contexts

* Maintain layer stack inside of SceneBuilder

* Remove EnsureSingleChild

* Centralize system-composite and elevation logic

* Wire up OpacityLayer to Scenic
2019-12-04 19:29:31 -08:00
Brian Osman
1a96087747
Update to newer path fill-type API in Skia (#14070) 2019-12-03 11:57:54 -05:00
Jason Simmons
c7ec5bbc1c
Convert images to raster on the GPU thread for Image.toByteData (#13647)
If the image is a cross-context image that might be read from the GPU thread
during onscreen rendering, then it is not safe to read it concurrently from
the IO thread as part of Image.toByteData.

If the GPU thread does not have a graphics context, then fall back to
converting the image on the IO thread.

Fixes https://github.com/flutter/flutter/issues/30697
2019-11-25 14:44:57 -08:00
Brian Osman
388f814d0e
Use new SkPathDirection enum, previous one is deprecated (#14005) 2019-11-25 14:03:16 -05:00
gaaclarke
97a23a80e1
Made a way to turn off the OpenGL operations on the IO thread for backgrounded apps (#13908) 2019-11-22 14:08:33 -08:00
gaaclarke
89e395853c
Refactor to passing functions by const ref (#13975)
Moved our code to passing functions by const ref
2019-11-22 12:20:02 -08:00