811 Commits

Author SHA1 Message Date
Gary Qian
c9fa545cf3 Platform resolved locale and Android localization refactor (flutter/engine#18645) 2020-06-16 04:29:50 -07:00
Yegor
b457938f23 apply null safety syntax to mobile dart:ui (flutter/engine#18933)
* apply null safety syntax to mobile dart:ui
2020-06-12 12:42:12 -07:00
liyuqian
b58ef5144e Add ui_benchmarks (flutter/engine#18945) 2020-06-11 10:55:03 -07:00
Brian Osman
3a2315895e SkMatrix::MakeFoo is deprecated, use SkMatrix::Foo instead (flutter/engine#18934) 2020-06-09 16:55:13 -04:00
Yegor
3a75937e4a nullability clean-ups (flutter/engine#18880)
* nullability clean-ups
2020-06-08 10:55:24 -07:00
Yegor
f53e3cad55 null-annotate remaining engine code (flutter/engine#18852)
* null-annotate remaining engine code
2020-06-05 21:00:07 -07:00
Yegor
9ed3637fa0 add nullability annotations to lib/ui/painting.dart (flutter/engine#18374)
* add nullability annotations to lib/ui/painting.dart
2020-06-05 10:26:14 -07:00
Yegor
84949bf44a add nullability annotations to ui/text.dart (flutter/engine#18400)
* add nullability annotations to ui/text.dart
2020-06-05 08:19:14 -07:00
Dan Field
16681d7292 Record path memory usage in SkPictures (flutter/engine#18827) 2020-06-04 15:48:25 -07:00
Yegor
b411311639 null annotate window.dart (flutter/engine#18789) 2020-06-04 14:31:08 -07:00
Yegor
ea849e7c04 null-annotate semantics.dart (flutter/engine#18791) 2020-06-04 11:35:24 -07:00
Dan Field
305435e0a5 Live region announcements for iOS (flutter/engine#18798) 2020-06-03 19:13:04 -07:00
Dan Field
0539f91b1e Implement GetAllocationSize for Vertices (flutter/engine#18756)
* Implement GetAllocationSize for Vertices

* Reflect vertex buffer size in pictures
2020-06-03 10:35:14 -07:00
stuartmorgan
d67aa8197f Revert "null-annotate SemanticsUpdateBuilder.updateNode (#18552)" (flutter/engine#18785)
This reverts commit c9085a90741aea65ff1479608f0e5d394e50ce72.
2020-06-03 09:54:06 -07:00
Dan Field
a96a8cc9ce Make images contribute to Picture allocation size, more aggressively release references when dispose is called (flutter/engine#18706)
SkImage references get held by both our Image and Picture objects. The GC has no idea about this, and so sometimes pictures look very small when they're actually holding a reference to a large chunk of memory. This patch helps make sure that the GC can more adequately catch the real size impact of Picture objects, and combined with an upstream patch in Dart allows for much more aggressive collection of unused image related memory.
2020-06-02 15:12:06 -07:00
Chris Bracken
c9085a9074 null-annotate SemanticsUpdateBuilder.updateNode (flutter/engine#18552)
The underlying _updateNode call requires that all parameters be set
non-null. There's a single call site in the framework in
lib/src/semantics/semantics.dart in SemanticsNode.updateWith(). At that
call site, all parameters are either asserted non-null in the
constructor of SemanticsData or defaulted to null, with the sole
exception of textDirection.

The ergonomics of this method are currently pretty ugly and we should
consider migrating most of the defaulting and assertions that we apply
at the call site up to the definition in dart:ui. That work is filed as
https://github.com/flutter/flutter/issues/57720.
2020-06-02 14:42:36 -07:00
Chris Bracken
e03feb13f7 null-annotate lib/ui/hooks.dart (flutter/engine#18555) 2020-06-02 09:49:50 -07:00
Dan Field
65afbec58a Make GetAllocationSize const (flutter/engine#18713) 2020-06-01 15:58:03 -07:00
chenjianguang
db630fbd93 Setup default font manager after engine created, to improve startup performance (flutter/engine#18225) 2020-05-28 17:53:04 -07:00
Chris Bracken
a7fdc142b4 null-annotate semantics.dart (flutter/engine#18553)
Covers the remaining API surface of the semantics library.
2020-05-21 14:24:08 -07:00
Yegor
18b68f0d98 sync ui geometry.dart into web_ui geometry.dart; add null safety annotations (flutter/engine#18356)
sync ui geometry.dart into web_ui geometry.dart; add null safety
2020-05-15 17:09:14 -07:00
Chris Bracken
f51d36301a null-annotate native calls in lib/ui/semantics.dart (flutter/engine#18436)
Also covers counterparts of these calls in web_ui.
2020-05-15 16:28:00 -07:00
Chris Bracken
c76923c65a null-annotate native calls in lib/ui/window.dart (flutter/engine#18430) 2020-05-15 15:38:57 -07:00
Chris Bracken
dae3cacc67 null-annotate lib/ui/natives.dart (flutter/engine#18349) 2020-05-15 09:33:11 -07:00
Yegor
ec93eba11d null-annotate compositing.dart (flutter/engine#18351) 2020-05-14 19:16:28 -07:00
Chris Bracken
a4edc3a287 null-annotate lib/ui/pointer.dart (flutter/engine#18354) 2020-05-14 15:17:29 -07:00
Chris Bracken
ccec586083 null-annotate lib/ui/plugins.dart (flutter/engine#18353) 2020-05-14 15:16:28 -07:00
Chris Bracken
f35f0d4cbe null-annotate lib/ui/isolate_name_server.dart (flutter/engine#18352) 2020-05-14 15:15:05 -07:00
Chris Bracken
07cdd1a2f1 Delete unused decode UTF-8, JSON functions (flutter/engine#18360)
These were added in 44ec9e55c9fb38dd8f94ebee3a19190472087c2c for use in
_handleNavigationMessage. That function was deleted in
0dd69f7b077bcde683df73f00a90ecacaa08df28, but the support methods were
left in the code. `// ignore: unused` annotations were added to all
private native entry points by dnfield (to work around what is arguably
a bug) in 2eae3feaafe2e95158d6b596acdfdbf346f60d98, and were applied to
these two methods, I suspect unintentionally.

In any case, they appear entirely unused at present.
2020-05-14 09:12:28 -07:00
Yegor
5db8fe0da7 null-annotate lerp.dart, annotations.dart, channel_buffers.dart, hash_codes.dart (flutter/engine#18348) 2020-05-13 16:35:22 -07:00
Alexander Aprelev
4b5878c6ab Introduce runtime check that it is root isolate that makes UI native calls. (flutter/engine#18050)
* Revert "Do not register UI-related native functions in secondary isolates (#6401)"

This reverts commit c23deb818efc3813273d28ce7d965d0eb261cca9 as it doesn't work when root and secondary isolates run in the same isolate group.

* Confirm it is root isolate that makes UI native calls.

* Fix format, UIDartState reference from Fuchsia source

* No UI isolate check for fuchsia calls

* Fix typo. Remove redundant runtime calls
2020-05-01 09:05:41 -07:00
Jason Simmons
8b4d81c16d Disable the import_internal_library analyzer check for dart:ui (flutter/engine#18009)
The latest version of dartanalyzer does not support disabling this for a
specific line of code.
2020-04-28 13:45:47 -07:00
Gary Qian
887c1a875e PlatformResolvedLocale localization message channel (flutter/engine#17755) 2020-04-21 15:34:44 -07:00
Brian Osman
948065c3a7 Convert semantics_node from SkMatrix44 to SkM44 (flutter/engine#17763)
* Convert semantics_node from SkMatrix44 to SkM44
2020-04-17 07:24:40 -04:00
chunhtai
2a55af809a always forward move event (flutter/engine#17541)
flutter/flutter#54022

The original issue is the _MotionEventsDispatcher depends on all down pointers to send out their own move events. If the third pointer has the movement of zero, it will get filter out by the PointerDataPacketConverter. This result with only two pointer move events been sent to RenderAndroidView, and they both get ignored because it is waiting for the third one.

This pr fixes it by always forward the move event
2020-04-07 11:24:11 -07:00
liyuqian
b4f8a7c881 GPU to raster rename, patch 2 (flutter/engine#17428) 2020-03-31 15:16:11 -07:00
liyuqian
b5318d05ff More rename from GPU thread to raster thread (flutter/engine#17408)
This PR touches variable names, class names, and file names so it's significantly more risky than its predecessor https://github.com/flutter/engine/pull/17329

Due to file name changes, this PR is expected to change the license files.

We haven't rename `shell/gpu` to `shell/raster` yet. It should be optional but I think it's better to have `raster_surface_software.cc` than `gpu_surface_software.cc`.
2020-03-31 14:05:28 -07:00
gaaclarke
ff0ab7cc79 Roll src/third_party/dart 1402e8e1a42d.e21c4353006d (95 commits) (flutter/engine#17386)
git log 1402e8e1a42d..e21c4353006d665e7c4378413ad4d237f18437e0 --date=short --first-parent --format='%ad %ae %s'
2020-03-30 jsimmons@google.com [dart:io] Fuchsia version of SocketBase::AvailableDatagram
2020-03-30 jwren@google.com Fix the dart help test output by implementing printUsage() in the test command
2020-03-30 sstrickl@google.com [vm/aot] Drop some Function objects not needed at runtime.
2020-03-30 mit@google.com Roll pub to latest version
2020-03-30 scheglov@google.com Document differences in inheritance tests between CFE and analyzer.
2020-03-30 scheglov@google.com Revert "Fix the result type of binary expression with the left TypeParameter extends num type."
2020-03-30 johnniwinther@google.com [cfe] Handle member signatures from dill in class hierarchy builder
2020-03-30 eernst@google.com [cfe] Add missing .next in endImplicitCreationExpression
2020-03-30 jensj@google.com [CFE] Add api to get language version for uri
2020-03-30 johnniwinther@google.com [cfe] Don't include member signature in id testing by default.
2020-03-30 johnniwinther@google.com [kernel] Make verbose qualified names conditional in toStringInternal
2020-03-30 devoncarew@google.com [dartdev] test the dartdev analyze --fatal-warnings option
2020-03-30 brianwilkerson@google.com Enable omit_local_variable_types in analyzer_plugin
2020-03-30 brianwilkerson@google.com Enable omit_loval_variable_types in analysis_server_client
2020-03-30 brianwilkerson@google.com Enable omit_local_variable_types in analysis_server
2020-03-30 keertip@google.com Add guard code for exceptions from ResourceProvider when reading contents.
2020-03-29 scheglov@google.com Fix the result type of binary expression with the left TypeParameter extends num type.
2020-03-28 scheglov@google.com Fix for creating a setter when the target is in a part without a library.
2020-03-28 brianwilkerson@google.com Remove the need for a --corpus flag from completion_metrics
2020-03-28 brianwilkerson@google.com Remove the need for a --corpus flag from relevance_metrics
2020-03-28 brianwilkerson@google.com Remove an unused variable in AstBuilder
2020-03-28 brianwilkerson@google.com Sort non-generated files in analyis_server and add a test to ensure they stay that way
2020-03-28 scheglov@google.com Add LibraryElement.languageVersionMajor/Minor
2020-03-28 scheglov@google.com Report exceptions with the file content for getResult().
2020-03-28 scheglov@google.com Fix crash in index when the invoked element is multiply defined.
2020-03-28 eernst@google.com Add implementation of several parts of non-function type aliases
2020-03-28 johnniwinther@google.com [cfe] Groups standard tests in update_expectations.dart
2020-03-28 sra@google.com [dart2js] Specialize is- and as- tests for nullable types
2020-03-28 rmacnak@google.com [vm] Do not allocate when evaluating arguments to StorePointer.
2020-03-28 rmacnak@google.com [vm] Fix some data races with profiler samples.
2020-03-28 alexmarkov@google.com Revert "[analyzer] Remove deprecated language version API"
2020-03-27 nshahan@google.com [ddc] Cleanup cast in dart:_runtime lib
2020-03-27 brianwilkerson@google.com New relevance values for UriContributor
2020-03-27 brianwilkerson@google.com New relevance values for KeywordContributor
2020-03-27 brianwilkerson@google.com New relevance values for VariableNameContributor
2020-03-27 paulberry@google.com Migration: don't use union edges for field formal parameters
2020-03-27 rmacnak@google.com [vm] Fix memory leak in profiler when some samples are in native functions without a dynamic symbol.
2020-03-27 bkonyi@google.com [ package:dds ] Fixed smoke_test.dart which was unable to launch smoke.dart due to use of a relative path.
2020-03-27 zichangguo@google.com [dart:io] Fix parsing the response of the HTTP connect method
2020-03-27 mfairhurst@google.com [nnbd_migration] Add confirm dialog to "apply migration" button
2020-03-27 rmacnak@google.com [test] Update use of Null as a bottom type to Never.
2020-03-27 eernst@google.com Added new tests.
2020-03-27 alexmarkov@google.com [vm/nnbd/aot/tfa] Support NNBD strong mode in type flow analysis
2020-03-27 mfairhurst@google.com [analyzer] Remove deprecated language version API
2020-03-27 brianwilkerson@google.com Update relevance computations in LocalReferenceContributor
2020-03-27 brianwilkerson@google.com Update relevance values for LocalLibraryContributor and ImportedReferenceContributor
2020-03-27 sigurdm@google.com Bump pub version
2020-03-27 sigmund@google.com [dart2js] Update test-matrix to specify the libraries.json to dart2js batch runner
2020-03-27 jcollins@google.com Update dartdoc to 0.30.3.
2020-03-27 alexmarkov@google.com [vm/nnbd] Fix marking static fields as late
2020-03-27 scheglov@google.com Fix for completion in formal parameters of GenericFunctionType.
2020-03-27 mfairhurst@google.com [nnbd_migration] Add a "rerun from sources" button.
2020-03-27 mfairhurst@google.com Revert "[analyzer] Copy result of allSupertypes for now."
2020-03-27 scheglov@google.com Merge types during instance member inference.
2020-03-27 scheglov@google.com Catch linking exceptions and include the cycle file contents.
2020-03-27 johnniwinther@google.com [cfe] Handle throw in return type inference
2020-03-27 alexmarkov@google.com [vm/aot/tfa] Fix tracking of parameters in async_op closures
2020-03-27 zichangguo@google.com Reland "[dart:io] Fix hanging on zero-length datagram"
2020-03-27 athom@google.com [infra] Update checked-in SDKs to 2.8.0-dev.18.0
2020-03-27 johnniwinther@google.com [cfe] Add tool for updating all id-tests and expectation tests
2020-03-27 athom@google.com [homebrew] Add support for the beta channel formula
2020-03-27 brianwilkerson@google.com Sort files in analysis_server_client and analyzer_plugin and add tests to keep them that way
2020-03-27 askesc@google.com [benchmark] Benchmark for UTF-8 decoding with typical data.
2020-03-27 jensj@google.com [parser] Change recovery for constructor; report errors in bad constructors
2020-03-27 johnniwinther@google.com [cfe] Use legacy erasure before argument inference
2020-03-27 jensj@google.com [kernel] Polish toString implementation on AST nodes
2020-03-27 sra@google.com [dart2js] Print non-minified init object as multiline
2020-03-27 karlklose@google.com [infra] Handle test steps with no tested configuration
2020-03-27 zichangguo@google.com [dart:io] remove available at _NativeSocket::Read
2020-03-27 nbosch@google.com Remove a stale TODO comment
2020-03-27 rnystrom@google.com Add other breaking changes to CHANGELOG.
2020-03-27 liama@google.com [nnbd/test] Fix tests that are failing in strong mode
2020-03-26 rnystrom@google.com Fix Markdown link in CHANGELOG and remove duplicate entry.
2020-03-26 brianwilkerson@google.com Compute new relevance in LocalConstructorContributor
2020-03-26 kevmoo@google.com DEPS: remove references to pkg:package_resolver
2020-03-26 jcollins@google.com Add a way for analysis_server to open communication via a IsolateChannel.
2020-03-26 scheglov@google.com Use NNBD_TOP_MERGE to combine signatures of the inherited members.
2020-03-26 nshahan@google.com [ddc] Update types in JSArray operations
2020-03-26 srawlins@google.com Migrator: Add an auth token for the preview site
2020-03-26 dacoharkes@google.com [vm] Add Reachability Fence Instruction
2020-03-26 sra@google.com [benchmark] Make BigIntPrintParse be NNBD-agnostic
2020-03-26 rnystrom@google.com Bump the SDK constraint on dart_internal to permit Dart 2.8.0.
2020-03-26 kevmoo@google.com Update changelog with dart2js --package-root removal
2020-03-26 alexmarkov@google.com [vm/corelib] Specify types explicitly in convert_patch.dart
2020-03-26 scheglov@google.com Update checkForWrongTypeParameterVarianceInMethod(), fix NPE.
2020-03-26 mfairhurst@google.com [analyzer] Copy result of allSupertypes for now.
2020-03-26 scheglov@google.com Add  more data to debug crash in buildExportNamespace().
2020-03-26 scheglov@google.com Fix for crash when FieldFormalParameter in a local function has annotations.
2020-03-26 bkonyi@google.com [ VM / DartDev ] Disable DartDev for the 2.8 release
2020-03-26 kevmoo@google.com Remove unused package-root option and configuration from dart2js
2020-03-26 srujzs@google.com [dart:html] Add nullability to EventTarget conversion
2020-03-26 kevmoo@google.com DEPS: Bring in latest pub
2020-03-26 dacoharkes@google.com [vm/ffi] Mark Struct as entrypoint
2020-03-26 jensj@google.com [analyzer] Sort entries in error.dart and syntactic_errors.dart
2020-03-26 karlklose@google.com [infra] pkg/smith: custom test runner steps are test steps
2020-03-30 15:22:47 -07:00
Dan Field
229089d3c7 Add keep annotation to Locale.toString (flutter/engine#17376) 2020-03-27 15:24:54 -07:00
Gary Qian
ba66644dce Locale: empty string equates to null (flutter/engine#17356) 2020-03-27 04:57:07 -07:00
liyuqian
10824995dd Rename GPU thread to raster thread in code comments (flutter/engine#17329)
1. Simple "GPU thread" to "raster thread" replacement.

2. Regex replace "GPU([\n\r\s]+//+ thread)" with "raster$1".

3. Regex replace "// gpu$" with "// raster".

4. Simple test change.

5. Run ci/format.sh
2020-03-25 22:49:59 -07:00
Yegor
b0f7f61073 Preserve zones in Window callbacks (flutter/engine#17298)
preserve Window callback zones
2020-03-25 17:25:06 -07:00
Gary Qian
700e276dd4 Add empty string check to Locale toString (flutter/engine#17280) 2020-03-24 15:54:40 -07:00
Chinmay Garde
929fb3f825 Remove checks for the always true using_fuchsia_sdk flag in all GN files. (flutter/engine#17261) 2020-03-23 18:31:02 -07:00
Dan Field
fd0cc9a285 Teach frontend compiler to replace toString with super.toString for selected packages (flutter/engine#17068)
Adds annotation `keepToString` to opt out.
2020-03-17 15:40:09 -07:00
Chinmay Garde
6349c95def Implement asynchronous texture uploads when using the Metal backend on iOS. (flutter/engine#17046)
This moves the Metal `GrContext` creation utilities from `GPUSurfaceMetal` into
a separate `IOSContext` object subclass. An analogue of this object was used in
the GL regime for the management of onscreen and offscreen contexts that were
not tied to the lifecycle of the `GPUSurface`. This pattern has now been
generalized for use with all backends that need a resource context
(`IOSContextGL` and `IOContextMetal`).

The platform views controller management in the `ExternalViewEmbedder` interface
implementation was repeated three times for [Metal][metal], [OpenGL](opengl) and
[Software](software) rendering. This repetition has been removed and a single
implementation present in the base `IOSSurface` and used on all platforms.
Addition of new client rendering APIs should not affect how the engine renders
into the platform view interleaving levels.

All rendering API selection logic has been moved into a single set of utilities
in `rendering_api_selection.h`. This enables the removal of a lot of code blocks
guarded by `FLUTTER_SHELL_ENABLE_METAL`. The remaining uses of this will be
removed when unified builds are enabled.

The Metal backend now also adds traces similar to the GL backend.

The `IOGLContext` has been renamed to `IOContextGL` to be more in line with the
convention used in this library.

Fixes https://github.com/flutter/flutter/issues/41827
Adds https://github.com/flutter/flutter/issues/52150

[metal]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_metal.mm (L55)
[opengl]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_gl.mm (L95)
[software]: 46dbf3a761/shell/platform/darwin/ios/ios_surface_software.mm (L146)
2020-03-10 16:01:53 -07:00
Chinmay Garde
52e75cba16 Use the ELF loader to setup AOT symbols in benchmark runner. (flutter/engine#17051)
We no longer package AOT artifacts as discrete blobs. The portable ELF loader
from the testing library may be used instead.

Fixes https://github.com/flutter/flutter/issues/52263
2020-03-10 12:28:24 -07:00
Dan Field
f48784c95b Avoid capturing this unsafely in MultiFrameCodec (flutter/engine#16824) 2020-03-09 21:18:50 -07:00
Chris Bracken
90f3de7400 Revert "Drop last usages of Dart_New from engine (#16838)" (flutter/engine#16915)
We believe this may be implicated in a Windows-specific crash during the
Flutter Gallery integration test.

See:
https://github.com/flutter/flutter/issues/51896

This reverts commit b41f86eb00e16e0dd6e1bfba7d670e05a8dafd4b.
2020-03-03 14:52:56 -08:00
Dan Field
b41f86eb00 Drop last usages of Dart_New from engine (flutter/engine#16838)
Image
Codec
FrameInfo
Scene/Picture toImage
2020-03-02 21:30:28 -08:00