Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

[canvaskit] Size the PictureRecorder when calling Scene.toImage #48142

Merged

Conversation

harryterkelsen
Copy link
Contributor

When calling flatten() to produce a Picture of a Scene, size the PictureRecorder to be the same size as the final image.

Fixes flutter/flutter#138009

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.

@flutter-dashboard
Copy link

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 or stuartmorgan on the #hackers channel in Chat (don't just cc them here, they won't see it! Use 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.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Nov 16, 2023
@yjbanov
Copy link
Contributor

yjbanov commented Nov 16, 2023

Unless an existing golden test catches the functional changes in this PR, I recommend adding a new test. Otherwise, LGTM

@harryterkelsen
Copy link
Contributor Author

Added a test, PTAL

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@harryterkelsen harryterkelsen merged commit 79f960a into flutter:main Nov 16, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Nov 17, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Nov 17, 2023
…138599)

flutter/engine@5064aef...90c3ada

2023-11-17 skia-flutter-autoroll@skia.org Roll Dart SDK from 12c5efc94edf to 46e8b18047eb (1 revision) (flutter/engine#48168)
2023-11-17 skia-flutter-autoroll@skia.org Roll Skia from c7d2a4933dfa to c8ee25282849 (2 revisions) (flutter/engine#48164)
2023-11-17 dnfield@google.com Only run systrace test on API 29+, avoid building scenario app for 28 (flutter/engine#48163)
2023-11-17 matanlurey@users.noreply.github.com Make `lib/ui/text/...` compatible with `.clang-tidy`. (flutter/engine#48156)
2023-11-17 matanlurey@users.noreply.github.com Make `flow/...` compatible with `.clang_tidy`. (flutter/engine#48148)
2023-11-17 bdero@google.com [Impeller] Add support for external GL textures to TiledTextureContents. (flutter/engine#47586)
2023-11-17 skia-flutter-autoroll@skia.org Roll Dart SDK from 906f23c1cb20 to 12c5efc94edf (1 revision) (flutter/engine#48157)
2023-11-17 skia-flutter-autoroll@skia.org Roll Skia from 762d95ed65e0 to c7d2a4933dfa (1 revision) (flutter/engine#48159)
2023-11-16 1961493+harryterkelsen@users.noreply.github.com [canvaskit] Size the PictureRecorder when calling Scene.toImage (flutter/engine#48142)

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 jonahwilliams@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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform-web Code specifically for the web engine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in golden testing a disabled chip with delete button in CanvasKit
2 participants