113 Commits

Author SHA1 Message Date
gaaclarke
091f0ff99e
License cpp jun24 (#171088)
additions:
- root package files need a header
- added ci step
- performance increases (executes in like 15s now)
- added README.md to the data directory
- cleaned up --v=1 log

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-06-25 18:29:57 +00:00
Jason Simmons
6c9a555e56
Roll vulkan-deps to 9edf248c597b (#162549) 2025-02-11 19:52:47 +00:00
Michael Goderbauer
8e0993eda8
Auto-format Dart code in engine (#160576)
This auto-formats all *.dart files in the `engine` subdirectory and
enforces that these files stay formatted with a presubmit check.
2024-12-19 17:13:07 +00:00
Joel Winarske
5c34b2ad0e vulkan_glfw validation layer logging (flutter/engine#54607)
This PR enables printing validation output when the Vulkan validation layer is enabled.  Without this change no messages are printed which provides a false positive for the Vulkan Embedder API health.

*List which issues are fixed by this PR. You must list at least one issue.*
https://github.com/flutter/flutter/issues/153663

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style

cc @chinmaygarde 

Fixes https://github.com/flutter/flutter/issues/153663
2024-08-22 16:03:17 +00:00
Joel Winarske
1961f2c5cc Export GPU symbols for embedder (flutter/engine#54662)
This PR exports GPU symbols for the embedder library.

*List which issues are fixed by this PR. You must list at least one issue.*
https://github.com/flutter/flutter/issues/153196

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2024-08-22 04:37:31 +00:00
Jason Simmons
2d015148d2 Update embedder example apps to run with the current engine tree (flutter/engine#51995)
* Update ICU data paths for the move of third_party/icu out of the buildroot
* Link with -rdynamic to enable lookup of Dart resource symbols within the app executables
* Use Material 3 text styles that are supported by the current Flutter framework
2024-04-09 23:37:18 +00:00
Tong Mu
ba26f6ee8b Multi-view View Metrics (flutter/engine#46174)
This PR adds `FlutterWindowMetricsEvent.viewId` to the embedder API.

This PR only tests the ability to send metrics event for the implicit
view. Once multiple views can be added via embedder API, we should test
the ability to send different IDs.

Part of https://github.com/flutter/flutter/issues/144806
Part of https://github.com/flutter/flutter/issues/142845

## Pre-launch Checklist

- [ ] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [ ] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [ ] I read and followed the [Flutter Style Guide] and the [C++,
Objective-C, Java style guides].
- [ ] I listed at least one issue that this PR fixes in the description
above.
- [ ] I added new tests to check the change I am making or feature I am
adding, or the PR is [test-exempt]. See [testing the engine] for
instructions on writing and running engine tests.
- [ ] I updated/added relevant documentation (doc comments with `///`).
- [ ] I signed the [CLA].
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#overview
[Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene
[test-exempt]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo
[C++, Objective-C, Java style guides]:
https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
[testing the engine]:
https://github.com/flutter/flutter/wiki/Testing-the-engine
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes
[Discord]: https://github.com/flutter/flutter/wiki/Chat
2024-03-13 17:00:17 -07:00
Jason Simmons
e017114099 Move vulkan-deps to //flutter/third_party/vulkan-deps (flutter/engine#51013)
See https://github.com/flutter/flutter/issues/144205
2024-02-27 21:59:00 +00:00
Jason Simmons
b576a1f647 Update the vulkan_glfw sample for the latest roll of vulkan-deps (flutter/engine#50839) 2024-02-21 22:58:42 +00:00
Tong Mu
2e551cb5c3 Multi-view pointer event (flutter/engine#46213)
This PR adds a new field `view_id` to embedder API's `FlutterPointerEvent`, allowing platforms to specify the source view of pointer events.

https://github.com/flutter/flutter/issues/112205

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
2023-12-20 19:21:22 +00:00
sunhongjie
13f3bd212b Fix embedder glfw examples cmake subdirectory path error (flutter/engine#48013)
Fix just a cmake glfw subdirectory path error in embedder examples.

Fix: https://github.com/flutter/flutter/issues/138340
2023-11-20 22:18:37 +00:00
Chris Bracken
ee313fa40f Move //third_party/glfw to //flutter/third_party/glfw (flutter/engine#46733)
As part of eliminating the Flutter buildroot (#67373), we are moving all
third-party dependencies from //third_party to //flutter/third_party.

This is the engine-side follow-up to flutter/buildroot#777.

Once all third-party dependencies have been migrated, tooling and config
will be moved and the buildroot will be eliminated altogether.

Issue: https://github.com/flutter/flutter/issues/136284

No tests changed because there is no semantic change to this PR. This is
simply relocating a dependency.
2023-10-10 18:21:54 -07:00
Matan Lurey
88a116a521 Update examples/** to provide --local-engine-host. (flutter/engine#44610)
Partial work towards https://github.com/flutter/flutter/issues/132245.
2023-08-10 17:47:38 -07:00
David Worsham
716b6a2cd4 [fuchsia] Only use upstream vulkan headers (flutter/engine#44157)
Stop using the special fuchsia headers, as they are contributing to
undefined behavior when building with LTO.
They are also no longer needed. All relevant fuchsia extensions were
upstreamed some time ago.

In the process, engage in some cleanup which means the "vulkan_config"
is also no longer needed. Rely on GN "public_deps" to provide the vulkan
include paths to various source sets.

See b/291462180 for more details on why this fix was neccesary.
2023-08-01 13:17:14 +10:00
Hidenori Matsubayashi
5441047c8e Fix double free or corruption exception (flutter/engine#39880)
Fix double free or corruption exception (GLFW_drm example)
2023-03-02 21:22:52 +00:00
Constantine Shablya
dcef53581c Fix Vulkan embedder example (flutter/engine#39052) 2023-01-27 15:55:06 +00:00
gaaclarke
2bff9b8d85 fixed glfw example for arm64 (flutter/engine#38426)
* fixed glfw example for arm64

* jenn feedback
2023-01-12 21:05:56 +00:00
Bernardo Eilert Trevisan
da10edb0b0 GLFW example with dirty region management (flutter/engine#35057)
* Update the GLFW example callbacks.

* Update the dart example.

* Update CMakeLists

* Update library dependencies in the BUILD file.

* Documenting.

* Formatting.

* Update the callback name.

* Move glfw_drm example to a new folder.

* Create new example folder for drm_embedder.

* Add the flutter spinkit dependency

* Update BUILD files.

* Do not compile glfw_drm example if running it on mac.

* Update the executable name for the glfw_drm example.

* Avoid looking for the surface and display every time since they are always the same.

* Formatting.

* GN formatting.

* Update the way the user malloc's the existing damage

* Update comment

* Update example and add gitignore.

Co-authored-by: Bernardo Eilert Trevisan <btrevisan@google.com>
2022-08-15 09:45:07 -07:00
Brandon DeRosier
990a78d1a1 Make the GLFW embedder example work on Linux (flutter/engine#34156) 2022-06-23 21:02:43 -07:00
Dan Field
f7163f555c Roll SwiftShader, ANGLE, use SwANGLE in test harnesses (flutter/engine#33814)
Roll Swiftshader, ANGLE, and Vulkan deps.

Updates license bot for new locations of licenses and new files
in roll.

Converts unit test harnesses to use SwANGLE, which is the
supported way of using SwiftShader as a software backend for GLES.

Updates goldens due to swiftshader changes.

Fixes up include paths to avoid directly including third_party
code by that name, which is unlikely to work in other build
environments.

Includes upstream patches to ANGLE and SwiftShader to build in our
windows environments, as well as patches to Skia to support
defining the location of VulkanMemoryAllocator and a patch to ANGLE
to support opting into a newer version of VMA.
2022-06-23 16:43:39 -07:00
Brandon DeRosier
0e98421276 Make the cmake GLFW embedder example easier to use (flutter/engine#34113) 2022-06-16 15:19:49 -07:00
Alexander Biggs
7f4e2bb9ba [examples] Ignore myapp from run.sh. (flutter/engine#32127)
run.sh creates a new Flutter app that shouldn't be committed.
2022-03-21 10:24:18 -07:00
Brandon DeRosier
bae75ce21d Vulkan embedder GLFW example (flutter/engine#31213) 2022-02-03 14:21:11 -08:00
Alexander Biggs
039101b3f1 [nit] Fix casing on a variable name. (flutter/engine#30866) 2022-01-20 13:30:10 -08:00
Alexander Biggs
978346d6b1 [examples] Ignore glfw/debug folder. (flutter/engine#30865) 2022-01-20 13:25:09 -08:00
Zachary Anderson
11c548f696 Disable building examples by default (flutter/engine#30946)
This should be paired with a recipe change to enable building the example on CI that I'll prepare shortly.
2022-01-20 09:46:23 -08:00
Chinmay Garde
047b85586e Allow builder to skip building examples. (flutter/engine#30917) 2022-01-19 11:55:10 -08:00
Chinmay Garde
bdd74b092a Make sure the GLFW example compiles. (flutter/engine#30442) 2021-12-21 12:29:09 -08:00
Brandon DeRosier
639395d577 Fix GLFW example to work with current Dart SDK (flutter/engine#28670) 2021-09-16 14:57:02 -07:00
Chris Bracken
13cf185e1c Correct setup-related typos (flutter/engine#24846)
Corrects uses of setup as a verb to 'set up', leaves noun/noun-phrase
forms of setup as 'setup'. Also settles on 'teardown' as opposed to
tear-down for consistency across the codebase.

A few other minor comment/wording corrections.
2021-03-08 17:31:10 -08:00
Yurii Nakonechnyi
44252b3f41 Added GLFW error-callback into FlutterEmbedderGLFW (flutter/engine#19998)
GLFW Error callback useful to clarify reasons of 'glfwInit()' failure.

On some platforms/desktop environments may be really strange failure reasons, like (in my case): "Linux: Failed to initialize inotify: Too many open files", so descriptive error messages helps to solve problem.
2020-09-24 14:39:20 -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
Chris Bracken
9ff7d7ca44 Copyright header hygiene improvements (flutter/engine#21089)
Add copyright headers in a few files where they were missing.

Trim trailing blank comment line where present, for consistency with
other engine code.

Use the standard libtxt copyright header in one file where it differed
(extra (C) and comma compared to other files in libtxt).

This also amends tools/const_finder/test/const_finder_test.dart to look
for a const an additional four lines down to account for the copyright
header added to the test fixture.
2020-09-11 08:55:37 -07:00
Yurii Nakonechnyi
f034712531 Clarify that run.sh builds and runs the GLFW example 2020-09-09 17:11:20 -07:00
gaaclarke
17cbf8c51e Added an embedder example (flutter/engine#12808) 2019-10-08 10:07:27 -07:00
Chinmay Garde
a623fddf8f Remove unused examples targets. (flutter/engine#6882)
These target are no longer built or referenced in either the Flutter or
Fuchsia buildroots. Similar examples are present in the examples/ directory
in the framework.
2018-11-16 12:31:25 -08:00
Michael Goderbauer
0def82ddb0 Unify copyright lines (flutter/engine#6757) 2018-11-07 12:24:35 -08:00
Maxim Mazurok
a85cd19202 Fixed typo (flutter/engine#6717)
In comments, replaced `...using using...` with just `...using...`
2018-11-01 15:15:18 -07:00
P.Y. Laligand
baf69ca25c [fuchsia] Removed the flutter_app template. (flutter/engine#4511)
It is moving to the Fuchsia codebase.
2018-01-04 09:20:41 -08:00
P.Y. Laligand
3a943b12c3 Update the location of Flutter packages. (flutter/engine#4257) 2017-10-20 14:25:49 -07:00
P.Y. Laligand
235f07742a Allow the project to be mapped to a location other than //flutter. (flutter/engine#4203)
This is for Fuchsia where we would like it to be located at //third_party/flutter.
2017-10-13 17:00:58 -07:00
P.Y. Laligand
281c792527 Add empty pubspec.yaml files. (flutter/engine#4212)
They help the analysis service identify packages and are now mandatory on Fuchsia.
2017-10-12 14:46:51 -07:00
P.Y. Laligand
ad4b6338af Properly pass the disable_analysis parameter. (flutter/engine#4177)
Added it to a few targets.
2017-10-06 10:48:25 -07:00
Ryan Macnak
d07c9b42f2 [fuchsia] Make it easy to flip the whole system between flutter_jit_app and flutter_aot_app. (flutter/engine#3873) 2017-07-19 14:21:02 -07:00
P.Y. Laligand
c4013f0a5e Fixed some analysis issues. (flutter/engine#3656) 2017-05-05 18:37:40 -07:00
P.Y. Laligand
456c1066eb Add missing dependency. (flutter/engine#3643) 2017-05-02 15:30:48 -07:00
Ryan Macnak
c549fc12ce Fuchsia AOT: (flutter/engine#3626)
- Fix flutter_aot_app template for moved Flutter tool GN label.
 - Add missing dart:io tree-shaking roots.
 - Add example AOT app to catch future breakage.
2017-04-25 13:28:52 -07:00
Ian Hickson
74b56314ea Remove the Point class. (flutter/engine#3567)
* Remove the Point class.

* Add Size.contains and Rect.translate for consistency

* Make Offset and Size compare == with subclasses.

Without this we would break the _DebugSize hack.

* Fix copy/pasta

* Fix the examples in the engine repo
2017-04-12 13:45:46 -07:00
Adam Barth
ab147d1977 Update for API change (flutter/engine#3176) 2016-10-27 10:19:30 -07:00
Adam Barth
96eeb27744 Update examples for window.physicalSize (flutter/engine#3086)
Now the engine always gives values in physical pixels.
2016-10-01 10:01:41 -07:00