180 Commits

Author SHA1 Message Date
Jason Simmons
6e16f8ecd2 Call rapidjson::ParseResult::IsError to check for JSON parsing errors (flutter/engine#29270) 2021-10-20 16:53:01 -07:00
Jason Simmons
79c7cfdc91 Defer setup of the default font manager if the embedding prefetched the font manager (flutter/engine#28987) 2021-10-04 13:23:02 -07:00
Jim Graham
619b6cdf77 enable DisplayList by default (flutter/engine#28946) 2021-09-30 00:23:01 -07:00
Darren Chan
b82554ae4a Implement a default font manager for Fuchsia. (flutter/engine#28673)
This helps us get rid of our hacky font switch after engine initialization.

See https://fxbug.dev/76406 and https://github.com/flutter/flutter/issues/82202.
2021-09-21 12:33:37 -07:00
David Worsham
657b63f499 fuchsia: Convert vulkanb headers to DEPS (flutter/engine#28676) 2021-09-16 22:39:06 -07:00
Jim Graham
10d49ea696 Add RasterCache metrics to the FrameTimings (flutter/engine#28439) 2021-09-03 16:26:01 -07:00
Jason Simmons
34f7c9e249 Ensure that Skia persistent cache filenames do not exceed the maximum allowed length (flutter/engine#28315) 2021-09-02 11:56:02 -07:00
Jim Graham
7fdbaaf1fe Revert "Reland enable DisplayList by default (#27892)" (flutter/engine#28308) 2021-08-25 14:31:02 -07:00
Jim Graham
8531128b8e Reland enable DisplayList by default (flutter/engine#27892) 2021-08-05 17:40:01 -07:00
Jason Simmons
27d018d498 Log all Skia trace events if the --trace-skia flag is passed (flutter/engine#27680) 2021-07-27 14:34:02 -07:00
Jim Graham
e8d98f49b2 Revert "Reland enable DisplayList by default (#27407)" (flutter/engine#27475)
This reverts commit 482a22bbd022557042b328275495f661fb0b0b16.
2021-07-16 10:48:22 -07:00
Jim Graham
482a22bbd0 Reland enable DisplayList by default (flutter/engine#27407) 2021-07-15 12:06:02 -07:00
Zachary Anderson
83066bd45d Add an option to use a prebuilt Dart SDK (flutter/engine#26931) 2021-07-08 10:36:34 -07:00
Jim Graham
d0a9ec4668 Revert "(Reland) enable DisplayList mechanism over SkPicture by default (#27175)" (flutter/engine#27230)
This reverts commit b267842218f6661bcd840772ccb4778529ea2a6c.
2021-07-07 18:48:37 -07:00
Jim Graham
b267842218 (Reland) enable DisplayList mechanism over SkPicture by default (flutter/engine#27175) 2021-07-07 13:41:01 -07:00
Jim Graham
b65f1675a9 Revert "enable DisplayList by default (#27130)" (flutter/engine#27153)
This reverts commit cbff6a03d0ad6307819321d56b3d06ab94039804.
2021-07-02 16:22:59 -07:00
Jim Graham
cbff6a03d0 enable DisplayList by default (flutter/engine#27130) 2021-07-02 13:31:02 -07:00
Kaushik Iska
833796b779 FrameTimings captures raster finish time in wall-clock time (flutter/engine#27074) 2021-07-01 11:36:02 -07:00
Jim Graham
ce11db413a Implement a DisplayList mechanism similar to the Skia SkLiteDL mechanism (flutter/engine#26928) 2021-06-30 17:31:02 -07:00
David Worsham
5e5fe01dd2 Reland "fuchsia: Delete all the legacy code! (#26422)" (flutter/engine#27075)
This reverts commit bb3c49a9c3edf931a5601f0245faa85f5e077cb4.
2021-06-30 15:43:21 -07:00
David Worsham
bad9b71a01 Revert "fuchsia: Delete all the legacy code! (#26422)" (flutter/engine#26637)
This reverts commit 9afd7d6af8a0d023c0db67d24c55eb6c08c48aba.
2021-06-08 12:47:44 -07:00
David Worsham
9afd7d6af8 fuchsia: Delete all the legacy code! (flutter/engine#26422) 2021-06-07 17:29:39 -07:00
freiling
0067ff89de [fuchsia] Migrate shader warmup to be triggered by Dart code. (flutter/engine#26114) 2021-06-02 16:45:17 -07:00
Jonah Williams
75017d4e26 plumb frame number through to framework (flutter/engine#26233) 2021-05-19 09:59:01 -07:00
Jason Simmons
7641bf1f5b Add an allowlist flag for Skia trace event categories (flutter/engine#25985) 2021-05-13 07:54:02 -07:00
Chinmay Garde
a0a8fb04d8 Wire up Metal shader precompilation from offline training runs. (flutter/engine#25644) 2021-04-19 16:24:02 -07:00
Chris Bracken
f4d1c89df1 Extract Dart logging to the embedders (flutter/engine#25402)
Previously messages logged from Dart code (e.g. via the print function)
were handled directly in the engine by platform-specific code. This
factors out a LogMessage(tag, message) callback that embedders can
implement with platform-specific code.

This also eliminates a dependency on platform-specific code in the core,
and provides more flexibility to embedders than the current fallback to
stdout, which can be a problem on platforms without a traditional stdout
or with restrictions on stdout.

Fixes https://github.com/flutter/flutter/issues/79685
2021-04-05 15:43:21 -07:00
freiling
a8cea746b9 [fuchsia][shader warmup] Avoid recursively iterating over assets directory when loading skp's due to high cost of openat() on pkgfs (flutter/engine#25006)
* [fuchsia][shader warmup] Fixed SkpWarmupTest

This test regressed due to https://github.com/flutter/engine/pull/23488
and this regression was silent due to https://github.com/flutter/flutter/issues/78277

Credit to @gnoliyil for actually putting together the fix.

* [fuchsia][shader warmup] Avoid recursively iterating over assets directory when loading skp's due to high cost of openat() on pkgfs
2021-04-01 23:23:52 -07:00
Jason Simmons
2aa7f4c1c2 Restore original value of the Dart advisory script URI (flutter/engine#24973)
Some flutter_tester scripts rely on the old value because Dart will convert
"main.dart" into a Platform.script URI containing a fully qualified path to
the script.
2021-03-12 10:05:10 -08:00
Jason Simmons
8c6f4a36de Signal an error if an Isolate.spawnUri call uses an unsupported URI (flutter/engine#24583) 2021-03-10 16:45:02 -08:00
Matej Knopp
7de5184eb9 Add DiffContext (flutter/engine#21824) 2021-02-18 14:41:01 -08:00
Kaushik Iska
da6faa257c Reland "[metal] Darwin unified external metal textures (#24157)" (flutter/engine#24350) 2021-02-11 09:24:36 -08:00
Kaushik Iska
3523722a49 Revert "Reland "[metal] Darwin unified external metal textures (#2415… (flutter/engine#24331)
This reverts commit 1deabe1decb00efe0275b34beb540be1bd93a80c.
2021-02-10 13:06:24 -08:00
Kaushik Iska
1deabe1dec Reland "[metal] Darwin unified external metal textures (#24157)" (flutter/engine#24244) 2021-02-09 08:45:16 -08:00
Zachary Anderson
8ea4641a8c Revert "[metal] Darwin unified external metal textures (#24157)" (flutter/engine#24223)
This reverts commit c9e6fec5a2f4d906c4cd05e51d0c7d81d44df999.
2021-02-05 08:38:04 -06:00
Kaushik Iska
c9e6fec5a2 [metal] Darwin unified external metal textures (flutter/engine#24157) 2021-02-04 11:51:02 -08:00
Michael Reed
7ef5d67e1b Use sampling instead of (deprecated) filter-quality (flutter/engine#24101) 2021-02-01 00:16:02 -08:00
Jason Simmons
074d70ce6d Link SkShaper/SkParagraph into the engine by default (flutter/engine#23626) 2021-01-12 15:49:01 -08:00
bungeman
e2bdcdeec8 Fix leak when parsing base64. (flutter/engine#23547)
The old SkBase64::decode interface required the user to delete the
result of SkBase64::getData. Use the newer SkBase64::Decode interface
which makes the memory ownership more obvious.
2021-01-11 11:56:23 -08:00
Jason Simmons
095b5d15fb Provide a runtime switch for selecting SkParagraph text layout (flutter/engine#23474) 2021-01-07 12:59:03 -08:00
Greg Spencer
8dcdbfad8b Reland: Remove the Window class now that it is no longer used. (flutter/engine#22566)
Reland #22505, now that flutter/flutter#70637 has landed.

Removes references to dart:ui.Window, and switch usages to PlatformDispatcher or SingletonFlutterWindow, as appropriate.
2020-11-17 16:39:07 -08:00
Kaushik Iska
8b9acb11b8 Move common graphics utils to //flutter/common/graphics (flutter/engine#22320) 2020-11-10 12:34:02 -08:00
Chinmay Garde
288c5ee97d Ensure root isolate create callback is invoked before the isolate is in the running phase. (flutter/engine#22041)
Embedders that have access to the Dart native API (only Fuchsia now) may perform
library setup in the isolate create callback. The engine used to depend on the
fact the root isolate entrypoint is invoked in the next iteration of message
loop (via the `_startIsolate` trampoline in `isolate_patch.dart`) to ensure that
library setup occur before the main entrypoint was invoked. However, due to
differences in the way in which message loops are setup in Fuchsia, this
entrypoint was run before the callback could be executed. Dart code on Fuchsia
also has the ability to access the underlying event loops directly. This patch
moves the invocation of the create callback to before user dart code has a
chance to run. This difference in behavior on Fuchsia became an issue when the
isolate initialization was reworked in https://github.com/flutter/engine/pull/21820
for null-safety.

Another issue was discovered in that the callback was being invoked twice, I
fixed that too and added a test.

Fixes https://github.com/flutter/flutter/issues/68732
2020-10-21 15:57:10 -07:00
Chinmay Garde
c0f4a193b0 Determine null-safety isolate flags for launches of the service isolate. (flutter/engine#22013) 2020-10-20 16:57:01 -07:00
Chinmay Garde
db5c793ed5 Enable loading snapshots with sound null safety enabled. (flutter/engine#21820)
Snapshots compiled with sound null-safety enabled require changes to the way in
which isolates are launched. Specifically, the `Dart_IsolateFlags::null_safety`
field needs to be known upfront. The value of this field can only be determined
once the kernel snapshot is available. This poses a problem in the engine
because the engine used to launch the isolate at shell initialization and only
need the kernel mappings later at isolate launch (when transitioning the root
isolate to the `DartIsolate::Phase::Running` phase). This patch delays launch of
the isolate on the UI task runner till a kernel mapping is available. The side
effects of this delay (callers no longer having access to the non-running
isolate handle) have been addressed in this patch. The DartIsolate API has also
been amended to hide the method that could return a non-running isolate to the
caller.  Instead, it has been replaced with a method that requires a valid
isolate configuration that returns a running root isolate. The isolate will be
launched by asking the isolate configuration for its null-safety
characteristics.

A side effect of enabling null-safety is that Dart APIs that work with legacy
types will now terminate the process if used with an isolate that has sound
null-safety enabled. These APIs may no longer be used in the engine. This
primarily affects the Dart Convertors in Tonic that convert certain C++ objects
into the Dart counterparts. All known Dart Converters have been updated to
convert C++ objects to non-nullable Dart types inferred using type traits of the
corresponding C++ object. The few spots in the engine that used the old Dart
APIs directly have been manually updated. To ensure that no usage of the legacy
APIs remain in the engine (as these would cause runtime process terminations),
the legacy APIs were prefixed with the `DART_LEGACY_API` macro and the macro
defined to `[[deprecated]]` in all engine translation units. While the engine
now primarily works with non-nullable Dart types, callers can still use
`Dart_TypeToNonNullableType` to acquire nullable types for use directly or with
Tonic. One use case that is not addressed with the Tonic Dart Convertors is the
creation of non-nullable lists of nullable types. This hasn’t come up so far in
the engine.

A minor related change is reworking tonic to define a single library target.
This allows the various tonic subsystems to depend on one another. Primarily,
this is used to make the Dart convertors use the logging utilities. This now
allows errors to be more descriptive as the presence of error handles is caught
(and logged) earlier.

Fixes https://github.com/flutter/flutter/issues/59879
2020-10-16 14:53:26 -07:00
Jenn Magder
14dee41f00 Add flag to not publish the observatory port over mDNS (flutter/engine#21883) 2020-10-15 14:53:20 -07:00
Jenn Magder
1be440e077 Revert "Add flag to not publish the observatory port over mDNS (#21632)" (flutter/engine#21882)
This reverts commit a23a450aebfb917907e3e9647dffc210e2f31bde.
2020-10-15 12:32:24 -07:00
Jenn Magder
a23a450aeb Add flag to not publish the observatory port over mDNS (flutter/engine#21632)
* Add flag to not publish the observatory port over mDNS

* Review edits

* Format
2020-10-15 10:48:50 -07:00
Dan Field
d9bd7aff97 set old_gen_heap_size to half of available memory on iOS (flutter/engine#20472) 2020-09-18 12:32:02 -07:00
Chris Bracken
d03692449b Prefer C++ standard headers to their C counterpart (flutter/engine#21091)
We currently use a mix of C standard includes (e.g. limits.h) and their
C++ variants (e.g. climits). This migrates to a consistent style for all
cases where the C++ variants are acceptable, but leaves the C
equivalents in place where they are required, such as in the embedder
API and other headers that may be used from C.
2020-09-11 17:10:00 -07:00