-
Notifications
You must be signed in to change notification settings - Fork 6k
Replace deprecated and internal Skia EncodedImage calls with public versions #41368
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Looks like Skia will need to expose https://github.com/google/skia/blob/main/src/codec/SkPixmapUtils.h#L37 or something similar to make some of the tests like |
|
Hopefully I've found all the places where the SkCodecImageGenerator was transparently applying Exif metadata rotations and made them explicit on the Flutter-side. |
dnfield
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a couple style nits.
|
I believe this is good to go. Rebasing to kick off CI which tripped on a timeout. |
|
auto label is removed for flutter/engine, pr: 41368, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label. |
|
The google failures are not because of this changed, filed b/280066465 and manually marked status. |
…125714) flutter/engine@98b6fab...2a84ea5 2023-04-28 zanderso@users.noreply.github.com Revert "Replace deprecated and internal Skia EncodedImage calls with public versions" (flutter/engine#41595) 2023-04-28 maruel@gmail.com Roll buildroot to c96c9d4641714301fab450a5f3b0f3c42712e1e3 (flutter/engine#41589) 2023-04-28 ychris@google.com [platform_view] Only dispose view when it is removed from the composition order (flutter/engine#41521) 2023-04-28 gspencergoog@users.noreply.github.com Determine lifecycle by looking at window focus also (flutter/engine#41094) 2023-04-28 zanderso@users.noreply.github.com Increase timeout for clang-tidy on mac (flutter/engine#41588) 2023-04-28 bdero@google.com [Impeller] Always enable validation for goldens (flutter/engine#41574) 2023-04-28 maruel@gmail.com fuchsia: do not read version_history.json (flutter/engine#41585) 2023-04-28 skia-flutter-autoroll@skia.org Roll Dart SDK from c7160d4ea0b7 to 8e9bf2bb9878 (5 revisions) (flutter/engine#41586) 2023-04-28 kjlubick@users.noreply.github.com Replace deprecated and internal Skia EncodedImage calls with public versions (flutter/engine#41368) 2023-04-28 skia-flutter-autoroll@skia.org Roll Skia from 05d09f28250a to 9867fa253064 (18 revisions) (flutter/engine#41584) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC jsimmons@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This is a reland of #41368 with fix for transparent images and a unit test to verify it. Skia would like to remove `SkImageGenerator::MakeFromEncoded` and this appears to be the only remaining usage. It appears to be easily swapped out for the `SkImages::DeferredFromEncodedData`. (skbug.com/13052) This also removes the use of the internal `SkCodecImageGenerator` for the public `SkCodec` API (which the image generator had just been deferring to anyway). While unbreaking some unit tests, I made a few assertions easier to debug and produce nicer error messages. ## 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] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] 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. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] 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
Chromium change: chromium/chromium@1cd1998 commit 1cd1998bdcf00f30ea443f0c1a9b91a298f571d4 Author: Kevin Lubick <kjlubick@google.com> Date: Fri Apr 21 09:59:05 2023 -0400 Expose SkPixmapUtils SkPixmapUtils::Orient is a useful utility when dealing with exif data. See also flutter/engine#41368 Bug: skia:13983
This is a reland of flutter#41368 with fix for transparent images and a unit test to verify it. Skia would like to remove `SkImageGenerator::MakeFromEncoded` and this appears to be the only remaining usage. It appears to be easily swapped out for the `SkImages::DeferredFromEncodedData`. (skbug.com/13052) This also removes the use of the internal `SkCodecImageGenerator` for the public `SkCodec` API (which the image generator had just been deferring to anyway). While unbreaking some unit tests, I made a few assertions easier to debug and produce nicer error messages. ## 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] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] 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. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] 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
Chromium change: chromium/chromium@1cd1998 commit 1cd1998bdcf00f30ea443f0c1a9b91a298f571d4 Author: Kevin Lubick <kjlubick@google.com> Date: Fri Apr 21 09:59:05 2023 -0400 Expose SkPixmapUtils SkPixmapUtils::Orient is a useful utility when dealing with exif data. See also flutter/engine#41368 Bug: skia:13983
Chromium change: chromium/chromium@1cd1998 commit 1cd1998bdcf00f30ea443f0c1a9b91a298f571d4 Author: Kevin Lubick <kjlubick@google.com> Date: Fri Apr 21 09:59:05 2023 -0400 Expose SkPixmapUtils SkPixmapUtils::Orient is a useful utility when dealing with exif data. See also flutter/engine#41368 Bug: skia:13983
Skia would like to remove
SkImageGenerator::MakeFromEncodedand this appears to be the only remaining usage. It appears to be easily swapped out for theSkImages::DeferredFromEncodedData. (skbug.com/13052)This also removes the use of the internal
SkCodecImageGeneratorfor the publicSkCodecAPI (which the image generator had just been deferring to anyway).While unbreaking some unit tests, I made a few assertions easier to debug and produce nicer error messages.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.