720 Commits

Author SHA1 Message Date
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
Jim Graham
ffcd8564a2
Imagefilter wrapper object (#13711)
Make ImageFilter objects comparable and printable.

This will help in areas in the Widget and RenderObject trees which try to avoid marking objects for updates if a setter is called with the same value (previously all ImageFilter objects would compare as not equal and appear to be new values).
2019-11-19 13:43:06 -08:00
chunhtai
132d38cd22
Moves pointer event sanitizing to engine. (#13697)
* Moves pointer event sanitizing to engine

* fix comment format

* fix formatting

* addressing comment

* fix format

* fix format

* addressing comment
2019-11-19 09:48:25 -08:00
Kate Lovett
f4fba66c2f
Adding opacity -> alpha method to Color class (#13902) 2019-11-19 09:48:04 -08:00
Gary Qian
b3463e3580
getLineBoundary edge condition use <= instead of < (#13881) 2019-11-15 15:14:03 -08:00
Jason Simmons
f5c002254b
Use Skia's matchStyleCSS3 to find bundled asset typefaces matching a font style (#13848)
This will improve font matching in SkParagraph for fonts that are bundled as
assets within the app.  Libtxt was using Minikin's FontFamily class to select
the closest matching font, but SkParagraph will rely on the matchStyle
implementation in the asset font manager.
2019-11-13 17:44:25 -08:00
chunhtai
1f1e2ba58e
reland add lifecycle enum (#13767)
This reverts commit 8ebb318401344793daa10c3bec97c34891cf7cc8.
2019-11-13 11:26:25 -08:00
Greg Spencer
f68de3f451
Add line boundary information to LineMetrics. (#13727)
This exposes the line boundary information a line by adding getLineBoundary to return the indices corresponding to a line around a TextPosition. The information is already calculated when calculating line metrics, so that we can enable moving the selection/cursor to the beginning/end of a line in a text field.
2019-11-11 16:42:40 -08:00
Greg Spencer
e0b9a2bb23
Change wordBoundary to take dynamic temporarily (#13765)
Converting the argument to Paragraph.wordBoundary to dynamic temporarily until the framework code is converted to send a TextPosition instead of an int.

I'll submit this, then update the framework side to send a TextPosition, and expect a TextRange
or a List<int>, and then submit that, then I'll change this code to send a TextRange and take a TextPostion only, removing the dynamic here. Once that's done, I'll remove the code in the framework that expects a TextRange or a List<int>, and have it just expect a TextRange.

This is so that we can change the API without breaking the builds.

Landing on red to kick the engine builds.
2019-11-08 16:27:00 -08:00
Greg Spencer
f7e73b6236
Move TextRange from the framework to dart:ui. (#13747)
This removes TextRange from the framework and moves it to the engine, in preparation for using it to return text ranges from the text extent APIs, like Paragraph.getWordBoundary instead of a List<int>.

Also added new tests for TextRange.
2019-11-08 12:21:46 -08:00
liyuqian
629930e888
Prefer SchedulerBinding.addTimingsCallback (#13728)
This doc update solves our TODO in https://github.com/flutter/flutter/pull/43676/files#diff-6a35a9a692c9af7473ba1a0a74c979c8R223
2019-11-07 14:05:43 -08:00
chunhtai
8ebb318401
Revert "Issues/39832 reland (#13642)" (#13720)
This reverts commit 1bfb928e071674a21779cee94908fbcae1c2e657.
2019-11-06 11:41:36 -08:00
chunhtai
1bfb928e07
Issues/39832 reland (#13642)
* Reland "Added new lifecycle enum (#11913)"
2019-11-05 14:52:16 -08:00
Gary Qian
0928c1af2f
Add 'Cough' test font and support multiple test fonts. (#13649) 2019-11-05 12:27:34 -08:00
chunhtai
fe0838e948
Revert "Added new lifecycle enum (#11913)" (#13632)
This reverts commit 02a479007420b05df8e075978ecdd15442ea520f.
2019-11-04 13:40:20 -08:00
chunhtai
02a4790074
Added new lifecycle enum (#11913) 2019-11-04 12:33:41 -08:00
gaaclarke
1eb15c12fb
Revert 78a8ca0f62b04fa49030ecdd2d91726c0639401f (#13467)
Put `Picture.toImage` back on the GPU thread.  Left the unit tests intact.
2019-10-31 16:57:52 -07:00
Yegor
49971e2140
Implement basic Picture.toImage via BitmapCanvas (#13391)
Implement basic Picture.toImage via BitmapCanvas and update the dartdocs.
2019-10-28 12:50:43 -07:00
Jason Simmons
4ecfa62735
Hold a reference to the Skia unref queue in UIDartState (#13239)
Obtaining the SkiaUnrefQueue through the IOManager is unsafe because
UIDartState has a weak pointer to the IOManager that can not be dereferenced
on the UI thread.
2019-10-21 14:15:03 -07:00
Gary Qian
8318d5f386
Update ui.instantiateImageCodec docs to reflect what it does. (#13233) 2019-10-21 12:29:19 -07:00
Jason Simmons
8882bf3c73
Avoid dereferencing IO manager weak pointers on the UI thread (#13232)
UI thread APIs that need to access the IO thread's resource context should
obtain a weak pointer to the IO manager and pass that to the IO thread.
2019-10-18 16:01:55 -07:00
George Wright
8b9761940b
Re-enable WeakPtr ThreadChecker and fix associated failures (#12257)
This re-enables thread safety checks for WeakPtr. WeakPtrs can't be used on a thread other than the one the WeakPtrFactory was created on.

This fixes the unit tests and adds a getUnsafe() method to WeakPtr to work around the remaining unresolved locations where we are using WeakPtr unsafely.
2019-10-17 14:10:16 -07:00
Chinmay Garde
a925df1898
Remove incomplete static thread safety annotations. (#13151)
Fixes https://github.com/flutter/flutter/issues/42704.
2019-10-16 17:28:31 -07:00
Dan Field
5b5b1c4b9f
ColorFilter matrix docs (#13100) 2019-10-11 16:01:16 -07:00
Chinmay Garde
86e3ebb748
Allow embedders to specify arbitrary data to the isolate on launch. (#13047)
Since this is currently only meant to be used by the embedding internally, the setter in Objective-C is only exposed via the FlutterDartProject private class extension. Unit tests have been added to the shell_unittests harness.

Fixes https://github.com/flutter/flutter/issues/37641
2019-10-10 12:31:14 -07:00
Greg Spencer
77252d2371
Add missing focusable testing info (#13013)
This adds a couple of instances of semantic node isFocusable info that were missing that the framework testing depends upon.
2019-10-09 09:00:24 -07:00
Kate Lovett
58d7b84177
Re-land Adding Link Semantics (#12972) 2019-10-08 11:27:56 -07:00
Sebastian Roth
32ca0cc7d3
Fix typo on channel buffer debug output. (#12960) 2019-10-08 18:06:32 +01:00
gaaclarke
3a445edda9
Made _printDebug only happen on debug builds of the engine for now. (#12980) 2019-10-08 10:05:48 -07:00
Gary Qian
eec8d5e733 Unpublicize kDoNotResizeDimension (#12989) 2019-10-08 00:31:34 -07:00
Dan Field
4a849e0f8d
Color matrix doc (#12982) 2019-10-07 17:22:01 -07:00
Kate Lovett
ac45051f2a
Revert "Adding Link SemanticsFlag (#12453)" (#12815)
This reverts commit 974ca210f5275aee0775b363e9c3416e1603cf73.
2019-10-04 17:06:32 -07:00
Kate Lovett
974ca210f5
Adding Link SemanticsFlag (#12453) 2019-10-04 12:51:10 -07:00
gaaclarke
f407e06970
Resize channel buffers (#12402)
Made it so you can resize channel buffers by sending messages to them.
2019-10-01 10:31:25 -07:00
Greg Spencer
05f4b33cd2
Add isFocusable to SemanticsFlag (#12618)
This adds an isFocusable to SemanticsFlag so that the framework can tell the engine what semantics nodes are allowed to be focused, which will affect what platform flags are applied to the semantics information.

This flag is not yet in use by the frame
2019-09-30 09:46:48 -07:00
liyuqian
7c3dcee2e9
Revert "[fuchsia] Wire up OpacityLayer to Scenic (#11322)" (#12610)
This reverts commit fcc4ab32301396986dd5103d6d444bff35fe0f63.

Fixes https://github.com/flutter/flutter/issues/41394 and other
related correctness issues.

TBR: @arbreng @jason-simmons @mehmetf
2019-09-27 16:50:43 -07:00
Jonah Williams
6f5eb1332f
Add support for JIT release mode (#12446) 2019-09-27 11:20:54 -07:00
Gary Qian
0018135a1c
Make kDoNotResizeDimension public so framework can use it directly (#12448) 2019-09-26 17:07:16 -04:00
Chinmay Garde
5b5fd7508c
Revert "Support accessibility labels on iOS switches. (#12404)" (#12466)
This reverts commit 147d0c3805499f5302f763da01fc40259b1a22ee.
2019-09-26 12:52:52 -07:00
brandondiamond
147d0c3805 Support accessibility labels on iOS switches. (#12404) 2019-09-26 11:14:44 -07:00
David Worsham
fcc4ab3230
[fuchsia] Wire up OpacityLayer to Scenic (#11322)
On Fuchsia, add a build flag for compositing OpacityLayers using the system
compositor vs Skia, which exposes a fastpath for opacity via Scenic.
This will only work under certain circumstances, in particular nested
OpacityLayers will not render correctly!

On Fuchsia, add a build flag for compositing PhysicalShapeLayers using
the system compositor vs Skia. Set to off by default, which restores
performant shadows on Fuchsia.

Remove the opacity exposed from ChildView, as that was added mistakenly.

Finally, we centralize the logic for switching between the
system-composited and in-process-composited paths inside of
ContainerLayer. We also centralize the logic for computing elevation
there. This allows the removal of many OS_FUCHSIA-specific code-paths.

Test: Ran workstation on Fuchsia; benchmarked before and after
Bug: 23711
Bug: 24163

* Fix broken tests
2019-09-25 12:48:42 -04:00