247 Commits

Author SHA1 Message Date
Brandon DeRosier
b4271c24de Add missing header guards (flutter/engine#41322)
These keep turning up, so I did a little bash-fu to find them all.
```bash
grep -lL "#pragma once" $(grep -lL "#ifndef .*_H_" $(find . | grep "\.h$")) | cut -c 3-
```
2023-04-19 21:20:21 +00:00
Chris Yang
d753239cc0 [mac] Build mac framework with app extension flag (flutter/engine#41011)
[mac] Build mac framework with app extension flag
2023-04-11 18:32:29 +00:00
Chris Bracken
3bf49d72e4 Support disabling backtrace support (flutter/engine#40980)
This adds a gn flag (--backtrace, --no-backtrace) that defaults to
enabling backtraces, which drives a gn variable `enable_backtrace` which
is defaulted true for debug builds.

Backtrace collection is supported on Windows, and on POSIX-like
operating systems via execinfo.h. execinfo support exists in Android,
macOS/iOS, and in glibc and uclibc on Linux. musl libc notably does not
include execinfo support, so this provides an escape hatch to build with
backtrace_stub.cc for situations in which compile time support doesn't
exist.

Proposed as an alternative to
https://github.com/flutter/engine/pull/40958 by @selfisekai.

Issue: https://github.com/flutter/flutter/issues/124285
2023-04-06 17:21:34 -07:00
Zachary Anderson
db6bf07686 Revert "[Impeller] Use Vulkan by default (#40809)" (flutter/engine#40820)
This reverts commit 35efb76a0606844593208ce0c6722aeb9c6b89cf.

Reverting for https://github.com/flutter/flutter/issues/123859
2023-03-31 08:05:36 -07:00
Dan Field
35efb76a06 [Impeller] Use Vulkan by default (flutter/engine#40809)
[Impeller] Use Vulkan by default
2023-03-31 05:05:56 +00:00
Chinmay Garde
8116ea14c7 [Impeller] Enable vulkan validations via a flag on Android. (flutter/engine#40792)
[Impeller] Enable vulkan validations via a flag on Android.
2023-03-30 20:07:51 +00:00
Zachary Anderson
6abd95a53b Provisional iOS impeller flag flip (flutter/engine#40405) 2023-03-17 20:35:36 -07:00
Zachary Anderson
d39891c432 Un-bitrot impeller_unittests; disable failing tests; disable non-metal backends (flutter/engine#40339) 2023-03-16 19:34:57 -07:00
Kevin Lubick
208eefd981 Fix forward declares and includes of some Skia Ganesh types (flutter/engine#40279)
Fix forward declares and includes of some Skia Ganesh types
2023-03-14 20:47:22 +00:00
Dan Field
f08b06a495 Preserve order when regenerating GPU images (flutter/engine#40268)
Preserve order when regenerating GPU images
2023-03-14 19:59:16 +00:00
Zachary Anderson
46decf5844 Add GN arguments that disable building host artifacts (flutter/engine#40242) 2023-03-11 19:38:43 -08:00
Chris Yang
baee6242e3 [ios] add setting flag to enable embedder api. (flutter/engine#40025)
[ios] add setting flag to enable embedder api.
2023-03-03 23:17:19 +00:00
Jackson Gardner
a3dc9e77fb Skwasm Renderer - initial implementation (flutter/engine#39072)
Skwasm Renderer - initial implementation
2023-03-02 00:01:04 +00:00
Jim Graham
0fa8cbec8a Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter (flutter/engine#39762)
* Create DlCanvas interface and implement with DisplayListBuilder and SkCanvasAdapter
2023-02-23 22:09:35 -08:00
Jason Simmons
5f09e0fdf0 Remove Libtxt and Minikin (flutter/engine#39499) 2023-02-13 17:16:04 +00:00
gaaclarke
f51ea3b01f [Impeller] Adds wide gamut support for iOS. (flutter/engine#39111)
* Implemented wide gamut images for iOS

Moved the surface to an extended range color format.

* wrong gamma but default pixel format set to bgra10_xr

* BGR10_XR add

* format

* updated todos

* updated todo with information about pixel formats

* switched logic for determining if we have a wide gamut image

* cleaned up gamut math to match style and linked source

* made the color attachment pixel format match the surface

* updated vulkan format switch

* removed comment

* added enable disable switch

* moved default to bgr10 for now since there is a bug where someone is still reading this, msaa?

* fixed the decoder settings to make sure we don't lose wide gamut colors

* fixed stored srgb gamut variable

* fixed false lint

* updated test

* added ability to grab the surface data for tests

* made the screenshot utility return the format

* added width and height to the platform channel payload

* fixed a couple of broken targets

* moved back the default pixel buffer format

* cleanup and add docstrings

* made the surfacedata feature only available in debug builds

* added decoding unit test

* fixed objc tests

* turned off by default

* bdero feedback1

* bdero2

* bdero3

* fixed merge issue

* removed using std::shared_ptr
2023-02-11 00:08:20 +00:00
Ben Konyi
d3f45828bf Reland "Remove references to Observatory (#38919)" (flutter/engine#39139)
This reverts commit 5dd945442b230a2c0549ee6d798fda71e031a4a9.
2023-01-30 09:50:09 -05:00
Ben Konyi
002fce29e0 Revert "Remove references to Observatory (#38919)" (flutter/engine#39035)
Reason for revert: breaking Flutter -> plugins roll

This reverts commit 1f603711c7b7afe52dff3872a5035789e3ddba02.
2023-01-20 12:33:40 -05:00
Ben Konyi
1f603711c7 Remove references to Observatory (flutter/engine#38919)
Observatory is being deprecated for Dart 3.0 so it should no longer be referenced in tooling messaging / flags.

See https://github.com/dart-lang/sdk/issues/50233
2023-01-19 09:20:46 -05:00
godofredoc
2e8d995cb6 Archive windows gen_snapshot.exe. (flutter/engine#35414)
* Archive windows gen_snapshot.exe.

This is required to enable engine_v2 recipes for windows platform.

Bug: https://github.com/flutter/flutter/issues/81855

* Add dep to generate gen_snapshot.exe.

* Use target platform name rather than host.

* Use prebuilt_arch.

* Use platform_name instead of is_win.

* Remove android check.

* Fix output name.

* Separate platform and cpu in name.

* Remove failing line.

* Use dart_target_arch rather than target_cpu in windows.

* Add dart_target_arch to scope.

* Add support for android_cpu.

* Fix android_cpu variable name.

* Rebase to ToT

* Try to use target cpu directly.

* Use host os instead of is_win.

* Build engine artifacts for win.

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>

* Update build/archives/BUILD.gn

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>

Co-authored-by: Zachary Anderson <zanderso@users.noreply.github.com>
2022-11-14 22:54:53 +00:00
ColdPaleLight
1218c3cf7b [Impeller] Support YUV external textures on iOS (flutter/engine#36685)
* Tweak Texture::Paint API

* Support external textures for iOS

* format code

* Tweak code

* format

* Clean code

* [Impeller] Support YUV external textures on iOS

* Fix test

* Clean code

* Fix compile error

* Add todo link

* Clean code
2022-11-03 22:13:01 +00:00
Jackson Gardner
c7d1a69158 Web sdk build reland (flutter/engine#36851) 2022-10-20 20:31:54 +00:00
ColdPaleLight
388cb71ea2 [Impeller] Support external textures on iOS (flutter/engine#36498) 2022-10-19 21:49:17 +00:00
Jackson Gardner
cf2bf1ba1b Revert "Build Web SDK in wasm build tree (#36520)" (flutter/engine#36805) 2022-10-17 18:40:05 +00:00
Jackson Gardner
48495d1865 Build Web SDK in wasm build tree (flutter/engine#36520) 2022-10-14 18:40:49 +00:00
gaaclarke
e41c775200 Removed instances of unnecessary values (flutter/engine#36221) 2022-09-26 21:28:04 +00:00
yaakovschectman
8e3c8bc88f Engine startup event timed after VM initializes (flutter/engine#35713)
* Engine startup event timed after VM initializes

* Formatting

* Update FlutterEngineMainEnter event comment

* Remove engine_start_time

* Remove unused variable
2022-08-31 10:48:44 -04:00
Dan Field
132ab1a321 Reland toImageSync (flutter/engine#35283) 2022-08-09 22:32:04 +00:00
Dan Field
abbca7b5e4 Revert "Collect textures from toImageSync safely (#35073)" (flutter/engine#35281)
This reverts commit 1f9bb2c26554f53995e7d02afc54a5566ad3310c.
2022-08-09 14:32:32 -07:00
Dan Field
1f9bb2c265 Collect textures from toImageSync safely (flutter/engine#35073) 2022-08-09 13:21:59 -07:00
Zachary Anderson
ab33453a89 Roll mac clang, ignore spurious lints (flutter/engine#35196) 2022-08-05 15:50:08 -07:00
Dan Field
0586f7b588 Drop --enable-display-list flag, remove associated branched code (flutter/engine#34233) 2022-06-23 00:07:04 +00:00
Jonah Williams
a184d04005 cleanup fractional translation ifdefs and config (flutter/engine#34198) 2022-06-22 09:00:57 -07:00
Jonah Williams
ffd7eadb73 enable SUPPORT_FRACTIONAL_TRANSLATION everywhere (flutter/engine#34141) 2022-06-21 10:16:02 -07:00
Jonah Williams
53eaa066a6 make fractional translation the default for desktop/tester (flutter/engine#34115) 2022-06-17 09:13:09 -07:00
Christopher Fujino
9ed0ddc68c Reland "Use CIPD to download prebuilt Dart SDKs #33345" (flutter/engine#33569) 2022-05-23 17:08:04 -07:00
Christopher Fujino
2fb1e6b810 Revert "Use CIPD to download prebuilt Dart SDKs (#33345)" (flutter/engine#33558)
This reverts commit faf29ed4589f4d025dd3d2349f34536de28844b7.
2022-05-23 10:09:40 -07:00
Dan Field
a73d5b5fbe Reland Enable MSAA behind a flag for iOS (flutter/engine#33505) 2022-05-19 23:58:05 -07:00
Zachary Anderson
faf29ed458 Use CIPD to download prebuilt Dart SDKs (flutter/engine#33345) 2022-05-17 12:56:44 -07:00
Jonah Williams
858241db7c Add configuration to support compiling engine with SUPPORT_FRACTIONAL_TRANSLATION (flutter/engine#33393) 2022-05-16 13:04:05 -07:00
Zachary Anderson
00607f96ea Reland: Roll clang and buildroot (flutter/engine#33339) 2022-05-14 06:04:14 -07:00
Zachary Anderson
b2e44faca7 Revert "Reland: Roll clang and buildroot (#33325)" (flutter/engine#33337)
This reverts commit ca0e980e45b222e3e4534abe4c4e87631bf329ac.
2022-05-13 19:28:06 -07:00
Zachary Anderson
ca0e980e45 Reland: Roll clang and buildroot (flutter/engine#33325) 2022-05-13 18:58:18 -07:00
Jonah Williams
815195114e allow flutter tester to disable font loading from asset bundle (flutter/engine#33323) 2022-05-13 15:04:06 -07:00
Chris Bracken
09285aac02 Use empty in place of size checks vs 0 (flutter/engine#33151) 2022-05-06 13:09:04 -07:00
Chris Bracken
1af24ccf62 Set Platform.executable on startup (flutter/engine#33127)
Previously, using Platform.executable (from dart:io) returned null (if
non-null-by-default was disabled) or threw an exception (if NNBD was
enabled) since we weren't setting it.

We now pass the executable name to Dart during VM startup based on the
first value in the FlutterProjectArgs::command_line_argv array passed to
FlutterEngineRun (or FlutterEngineInitialize) on startup. argv[0] (if
specified) is explicitly documented as being required to be the
executable name in embedder.h. In the case where no argv[0] is
specified, we instead set Platform.executable to "Flutter" in order to
avoid violating the (non-nullable) type annotation on
Platform.executable.

Note that dart::bin::SetExecutableName() does NOT make a copy of the
input string, so that value needs to be available for the entire lifetime
of the VM.

This also adds EmbedderConfigBuilder::SetExecutableName() to support
setting a fake executable name in unittests. By default, we continue to
set the name "embedder_unittest" unless overridden using this method.

See: https://api.flutter.dev/flutter/dart-io/Platform/executable.html
See: https://github.com/dart-lang/sdk/issues/48427

Issue: https://github.com/flutter/flutter/issues/83921
2022-05-05 11:14:16 -07:00
godofredoc
1df74f0938 Fix gtk targets for arm64 artifacts. (flutter/engine#33130) 2022-05-05 09:54:08 -07:00
Chris Bracken
0a84242538 WinUWP: Remove WinUWP sources, targets (flutter/engine#33019)
This removes:
* The Windows UWP emebedder sources and targets
* UWP-specific build targets
* UWP-specific code behind WINUWP #ifdefs
* UWP-specific TODOs.
* uwptool.exe sources and targets used for installing, uninstalling, and
  launching UWP apps.

This is a straight removal patch, and does not land any refactorings
made possible by removal of UWP support. Those patches will land in
followup refactorings.

Tool support was removed in:
https://github.com/flutter/flutter/pull/102174

The CI target was removed in:
https://github.com/flutter/engine/pull/33012

The Recipe was removed in:
https://flutter-review.googlesource.com/c/recipes/+/29500

GN build support was removed in:
https://github.com/flutter/engine/pull/33016

Issue: https://github.com/flutter/flutter/issues/102172
2022-04-29 18:39:36 -07:00
Jason Simmons
d9de6d31cf Disable the timeline in release mode on Android unless systrace is enabled (flutter/engine#32909) 2022-04-26 10:54:03 -07:00
ColdPaleLight
31e332ee32 Tuning resource cache max bytes in lightweight engine scenarios (flutter/engine#32156) 2022-03-31 21:11:05 -07:00