1427 Commits

Author SHA1 Message Date
Dan Field
e92e4daa76 Move Skia conversion utilities to own TU (flutter/engine#40997)
Move Skia conversion utilities to own TU
2023-04-10 16:46:04 +00:00
Dan Field
967f12d809 [Impeller] Make multi-frame image decodes work even if the GPU switch is disabled (flutter/engine#40963)
Fixes https://github.com/flutter/flutter/issues/124269

Manually verified this is safe on an iPhone 11.

We're not creating/encoding command buffers in this path so it's ok.
AFAICT the test I added would fail if we started doing that because it
doesn't provide any real command buffer interfaces. Most of the code
here is related to tests.
2023-04-06 11:40:27 -07:00
Chinmay Garde
51aca8ead9 [Impeller] Don't crash in image decompression if the context is unavailable. (flutter/engine#40890)
[Impeller] Don't crash in image decompression if the context is unavailable.
2023-04-03 19:49:04 +00:00
Zachary Anderson
284b13faae Revert "[macOS] Change view ID to signed" (flutter/engine#40829)
Reverts flutter/engine#39958

Failing the roll to the framework starting with
https://github.com/flutter/flutter/pull/123893

One example:
https://ci.chromium.org/ui/p/flutter/builders/try/Mac%20dart_plugin_registry_test/21819/overview
2023-03-31 13:52:57 -07:00
Tong Mu
d3bbe5cb8a [macOS] Change view ID to signed (flutter/engine#39958)
This PR makes view ID signed from unsigned int64.

Initially, I made view IDs unsigned because they were opaque anyway. As
I'm working deeper into multiview, I found some issues that made me
think signed is better:

* Unsigned integers are worse
  * Sometimes you want negative values to represent special values.
* Unsigned integers are dangerous (if compared with signed ones by
mistake.)
* Unsigned integers are not needed
  * We're very unlikely to reach that big anyway.
  * Almost all other languages support only signed integers.
  * Also JavaScript only supports up to 51 bits of integer.

Therefore I think it's better to change them to signed int64, especially
before these APIs are widely used by developers.

## 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 Hixie said 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
[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
2023-03-31 12:11:49 -07:00
Kevin Lubick
f944e918a1 Use new SkImages namespace instead of legacy SkImage static functions (flutter/engine#40761)
Use new SkImages namespace instead of legacy SkImage static functions
2023-03-30 20:22:09 +00:00
Bernardo Ferrari
60663bccf0 SemanticsFlag/SemanticsAction enum migration (part 1) (flutter/engine#40571)
`SemanticsFlag`/`SemanticsAction` enum migration (part 1)
2023-03-30 18:32:38 +00:00
Dan Field
340d78d20b [Impeller] Start a more generic stroke tessellator for path (flutter/engine#40690)
[Impeller] Start a more generic stroke tessellator for path
2023-03-29 06:07:05 +00:00
Michael Goderbauer
a508065bbc Reland "Post 3.0 lint sync (#40394)" (flutter/engine#40688)
Reland "Post 3.0 lint sync (#40394)"
2023-03-28 03:25:02 +00:00
Brandon DeRosier
9e9590a68f Revert "Post 3.0 lint sync (#40394)" (flutter/engine#40687)
This reverts commit 8ba209121d2671b0d202d9731fe67ec5eb1529b4.
2023-03-27 15:45:59 -07:00
bungeman
13b279990a Simplify SkFontMgr classes for sk_sp (flutter/engine#40627)
These subclasses were previously made very generic to work with both the
pre-sk_sp version of SkFontMgr and the using-sk_sp version of SkFontMgr.
Now that SkFontMgr uses sk_sp for return types, simplify the subclasses.
2023-03-27 16:06:07 -04:00
Michael Goderbauer
8ba209121d Post 3.0 lint sync (flutter/engine#40394)
Post 3.0 lint sync
2023-03-27 17:15:08 +00:00
Brandon DeRosier
7cfb268a9a [Impeller] Keep impeller scene build working (flutter/engine#40635) 2023-03-26 12:32:13 -07:00
Dan Field
96773d7c04 Avoid implicit conversions to floats in dart:ui (flutter/engine#40098)
Avoid implicit conversions to floats in dart:ui
2023-03-24 21:36:41 +00:00
Jonah Williams
60987522d2 [impeller] use lossy texture compression on iOS (flutter/engine#40520)
[Impeller] use lossy texture compression on iOS for decode images and MSAA resolve textures.
2023-03-23 20:29:40 +00:00
bungeman
d347698e68 Make SkFontMgr subclasses flexible for sk_sp (flutter/engine#40556)
Skia is changing SkFontMgr and SkFontStyleSet methods to consistently
return sk_sp<SkTypeface> and sk_sp<SkFontStyleSet> instead of
SkTypeface* and SkFontStyleSet*. The pointers returned always needed to
be SkSafeUnref'ed but with sk_sp this ownership is now explicit.

Flutter subclasses both SkFontMgr and SkFontStyleSet and overrides
affected methods. Normally Skia would roll out this change behind a
build flag which would first be set in Flutter (to hold out the change),
Skia then rolled into Flutter, then the build flag removed from Flutter
(along with updating the subclasses). However, this is made quite
difficult and slow because of the need to also be compatible with
Flutter in other repositories at the same time. Instead, this change
updates the subclasses to infer the correct return types in a way that
will work both with and without the Skia change. After the Skia change
is landed and rolled into Flutter the subclasses will be re-simplified
to match the new method signatures.

[0] https://skia-review.googlesource.com/c/skia/+/659856
2023-03-23 09:48:22 -04:00
Jonah Williams
7b228c8b4b [impeller] always copy bitmaps when given unencoded data (flutter/engine#40543)
[impeller] always copy bitmaps when given unencoded data
2023-03-23 00:54:01 +00:00
Kevin Lubick
68a9130ffb Fix includes in image_decoder_impeller (flutter/engine#40533) 2023-03-22 11:16:58 -07:00
Michael Goderbauer
c38bab734a Reland "Deprecate SingletonFlutterWindow and global window singleton (#39302)" (flutter/engine#40511)
Reland "Deprecate SingletonFlutterWindow and global window singleton (#39302)"
2023-03-22 16:54:27 +00:00
Jonah Williams
10e9dfa1c4 [impeller] if not creating mipmaps dont set mip count (flutter/engine#40513)
[impeller] if not creating mipmaps dont set mip count
2023-03-22 02:09:11 +00:00
Brandon DeRosier
6830e3c129 Revert "Deprecate SingletonFlutterWindow and global window singleton (#39302)" (flutter/engine#40507)
Revert "Deprecate SingletonFlutterWindow and global window singleton"
2023-03-22 00:48:03 +00:00
Michael Goderbauer
c3f475f8c5 Deprecate SingletonFlutterWindow and global window singleton (flutter/engine#39302)
Deprecate SingletonFlutterWindow and global window singleton
2023-03-21 22:11:02 +00:00
Jonah Williams
90a522d378 [Impeller] Allocate images into host buffer, blit to device private texture. (flutter/engine#40410)
[Impeller] Allocate images into host buffer, blit to device private texture.
2023-03-21 20:56:00 +00:00
Martin Kustermann
fce1533905 Avoid registering service extensions in flutter-release mode (flutter/engine#40484)
Doing so is currently a NOP because `vm-service` isn't available in
flutter-release (aka Dart VM product) mode.

So this makes startup time of isolates slightly faster in
release mode and allows tree shaking of the relevant code in release
mode.
2023-03-21 10:23:23 +01:00
Jim Graham
37317c5984 restructure DL sources into sub-directories and new file naming conventions (flutter/engine#40157)
restructure DL sources into sub-directories and new file naming conventions
2023-03-21 02:34:48 +00:00
Jonah Williams
0eaad5010e [impeller] serialize texture upload (flutter/engine#40464)
[impeller] serialize texture upload
2023-03-20 21:46:08 +00:00
Greg Spencer
28a810a5b2 Rename setters for lifecycle state (flutter/engine#40462)
Rename setters for lifecycle state
2023-03-20 21:16:21 +00:00
Jim Graham
f9918c006e Reland "Sequester all Skia<->DL interactions into the skia sub-module" (flutter/engine#40435)
Reland "Sequester all Skia<->DL interactions into the skia sub-module"
2023-03-19 22:59:17 +00:00
Jonah Williams
c13f016ce4 Revert "[Impeller] mark decoded images as optimized for GPU access (#40356)" (flutter/engine#40387)
Revert "[Impeller] mark decoded images as optimized for GPU access"
2023-03-17 19:14:52 +00:00
Michael Goderbauer
1986d84d6e replace some ._() constructors with class modifiers (flutter/engine#40328)
replace some ._() constructors with class modifiers
2023-03-17 16:18:49 +00: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
Dan Field
7ccdcf1f9c Update documentation on AccessibilityFeatures.boldText (flutter/engine#40364)
Update documentation on `AccessibilityFeatures.boldText`
2023-03-16 22:33:07 +00:00
Jonah Williams
88665559c5 [Impeller] mark decoded images as optimized for GPU access (flutter/engine#40356)
[Impeller] mark decoded images as optimized for GPU access
2023-03-16 21:23:50 +00:00
Jim Graham
eb3a75ef78 Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module" (#40319)" (flutter/engine#40357)
Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module""
2023-03-16 19:55:51 +00:00
Jim Graham
4107e5a226 Reland "Sequester all Skia<->DL interactions into the skia sub-module" (flutter/engine#40319)
Reland "Sequester all Skia<->DL interactions into the skia sub-module"
2023-03-15 22:56:01 +00:00
gaaclarke
92e15f46fa Added float32 support to decodeImageFromPixels (flutter/engine#40068)
Added float32 support to decodeImageFromPixels
2023-03-15 19:39:01 +00:00
gaaclarke
695cfa5fe8 Reland: "Added wide-gamut color support for ui.Image.toByteData and ui.Image.colorSpace" (flutter/engine#40312)
Reland: "Added wide-gamut color support for `ui.Image.toByteData` and `ui.Image.colorSpace`"
2023-03-15 17:29:10 +00:00
Casey Hillers
d850089e9e Revert "Added wide-gamut color support for ui.Image.toByteData and ui.Image.colorSpace (#40031)" (flutter/engine#40295)
Revert "Added wide-gamut color support for `ui.Image.toByteData` and `ui.Image.colorSpace`"
2023-03-15 04:04:11 +00:00
Jim Graham
b89acc989c Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module" (#40243)" (flutter/engine#40283)
This reverts commit bbc993164a0d2f7d5a1b7b052ff884500040acc0.
2023-03-14 15:33:08 -07:00
gaaclarke
f4280b695c Added wide-gamut color support for ui.Image.toByteData and ui.Image.colorSpace (flutter/engine#40031)
Added wide-gamut color support for `ui.Image.toByteData` and `ui.Image.colorSpace`
2023-03-14 22:25:47 +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
Jim Graham
bbc993164a Reland "Sequester all Skia<->DL interactions into the skia sub-module" (flutter/engine#40243)
Reland "Sequester all Skia<->DL interactions into the skia sub-module"
2023-03-14 18:53:06 +00:00
Zachary Anderson
8c46471d24 Revert "[Impeller] More sundry fixes to the Vulkan backend. (#40244)" (flutter/engine#40247)
Revert "[Impeller] More sundry fixes to the Vulkan backend."
2023-03-13 15:45:38 +00:00
Chinmay Garde
3ea71b3d11 [Impeller] More sundry fixes to the Vulkan backend. (flutter/engine#40244)
[Impeller] More sundry fixes to the Vulkan backend.
2023-03-13 06:49:22 +00:00
gaaclarke
a83570e7bf Fixed bug where images without specified colorspaces can crash wide gamut test. (flutter/engine#40097)
Fixed crash with images without specified colorspaces in wide gamut test
2023-03-09 23:07:22 +00:00
Jonah Williams
726df65356 Reland: Move asset opening to background thread, fix dart persistent value destruction (flutter/engine#40183)
Reland: Move asset opening to background thread, fix dart persistent value destruction
2023-03-09 22:58:04 +00:00
Jim Graham
bc162fe559 Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module" (#40114)" (flutter/engine#40161)
Revert "Reland "Sequester all Skia<->DL interactions into the skia sub-module""
2023-03-09 02:41:54 +00:00
Dan Field
0af50a84c0 Fix multi-frame codec frame reuse (flutter/engine#40125) 2023-03-08 15:49:36 -08:00
Zachary Anderson
44947b8822 Revert "[engine] move asset mapping copy to background thread (#39918)" (flutter/engine#40147)
Revert "[engine] move asset mapping copy to background thread"
2023-03-08 19:30:27 +00:00
Jonah Williams
9bc89c950c [engine] move asset mapping copy to background thread (flutter/engine#39918)
[engine] move asset mapping copy to background thread
2023-03-08 00:28:34 +00:00