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

Conversation

@kpsroka
Copy link
Contributor

@kpsroka kpsroka commented Aug 30, 2024

Handles exceptions coming from MakeSWCanvasSurface and MakeOffscreenSWCanvasSurface.

Also makes surface size a member of CkSurface to make sure that it's always in sync with surface.

Fixes flutter/flutter#154402

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, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Aug 30, 2024
@kpsroka kpsroka force-pushed the fix/web-canvaskit_make-surface-access-null-safer branch from a20540f to ad65043 Compare August 30, 2024 11:54
@kpsroka kpsroka changed the title Makes access to CkSurface null-safer [canvaskit] Makes access to CkSurface null-safer Aug 30, 2024
@kpsroka kpsroka force-pushed the fix/web-canvaskit_make-surface-access-null-safer branch from ad65043 to 8e5ae62 Compare September 3, 2024 07:53
@kpsroka kpsroka force-pushed the fix/web-canvaskit_make-surface-access-null-safer branch from b3b1bc6 to f57596e Compare September 10, 2024 12:57
@harryterkelsen harryterkelsen self-requested a review September 12, 2024 18:21
Copy link
Contributor

@harryterkelsen harryterkelsen 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
Copy link
Contributor

Sorry for the delay, LGTM!

@harryterkelsen harryterkelsen added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 3, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 3, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 3, 2024

auto label is removed for flutter/engine/54895, due to This PR has not met approval requirements for merging. The PR author is not a member of flutter-hackers and needs 1 more review(s) in order to merge this PR.

  • Merge guidelines: A PR needs at least one approved review if the author is already part of flutter-hackers or two member reviews if the author is not a flutter-hacker before re-applying the autosubmit label. Reviewers: If you left a comment approving, please use the "approve" review action instead.

@yjbanov
Copy link
Contributor

yjbanov commented Oct 3, 2024

Code LGTM, but this needs a test.

@kpsroka
Copy link
Contributor Author

kpsroka commented Oct 4, 2024

Code LGTM, but this needs a test.

Thanks for the LGTMs. I'm currently on a medical leave, and will be able to pick it up after the next week.

@kpsroka kpsroka force-pushed the fix/web-canvaskit_make-surface-access-null-safer branch from f57596e to f930db4 Compare October 15, 2024 11:02
@kpsroka
Copy link
Contributor Author

kpsroka commented Oct 15, 2024

Code LGTM, but this needs a test.

Added a test for this fix, PTAL.

@kpsroka
Copy link
Contributor Author

kpsroka commented Oct 17, 2024

@yjbanov @harryterkelsen 👋 It shouldn't take more than 3 minutes to add autosubmit/ask for changes.

@kpsroka kpsroka requested a review from yjbanov October 22, 2024 12:02
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 23, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 23, 2024
flutter/engine@50f6d98...ec6e28a

2024-10-23 jonahwilliams@google.com [display_list] grow display list backing store by power of two. (flutter/engine#56004)
2024-10-23 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from xPbin_33tT-_omeQT... to NxrFCTty8wV4-6Cpl... (flutter/engine#56056)
2024-10-23 skia-flutter-autoroll@skia.org Roll Dart SDK from 20470aaa17be to 2a4b728f6a03 (3 revisions) (flutter/engine#56055)
2024-10-23 robert.ancell@canonical.com Move get_keyboard_state from FlKeyboardViewDelegate to FlKeyboardManager. (flutter/engine#56021)
2024-10-23 robert.ancell@canonical.com Move send_key_event from FlKeyboardViewDelegate to FlKeyboardManager. (flutter/engine#56020)
2024-10-23 bdero@google.com [Flutter GPU] Fix assert failure in createDeviceBufferWithCopy. (flutter/engine#56039)
2024-10-22 skia-flutter-autoroll@skia.org Roll Dart SDK from 8de85635d731 to 20470aaa17be (4 revisions) (flutter/engine#56038)
2024-10-22 ditman@gmail.com [web] Remove old futureToPromise. (flutter/engine#55847)
2024-10-22 737941+loic-sharma@users.noreply.github.com [dart:ui] Improve Clip's docs (flutter/engine#55978)
2024-10-22 jonahwilliams@google.com [Impeller] flush thread local resources during toImage/toImageSync. (flutter/engine#56037)
2024-10-22 kpsroka@users.noreply.github.com [canvaskit] Makes access to CkSurface null-safer (flutter/engine#54895)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from xPbin_33tT-_ to NxrFCTty8wV4

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 codefu@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
M97Chahboun pushed a commit to M97Chahboun/flutter that referenced this pull request Oct 30, 2024
…57453)

flutter/engine@50f6d98...ec6e28a

2024-10-23 jonahwilliams@google.com [display_list] grow display list backing store by power of two. (flutter/engine#56004)
2024-10-23 skia-flutter-autoroll@skia.org Roll Fuchsia Linux SDK from xPbin_33tT-_omeQT... to NxrFCTty8wV4-6Cpl... (flutter/engine#56056)
2024-10-23 skia-flutter-autoroll@skia.org Roll Dart SDK from 20470aaa17be to 2a4b728f6a03 (3 revisions) (flutter/engine#56055)
2024-10-23 robert.ancell@canonical.com Move get_keyboard_state from FlKeyboardViewDelegate to FlKeyboardManager. (flutter/engine#56021)
2024-10-23 robert.ancell@canonical.com Move send_key_event from FlKeyboardViewDelegate to FlKeyboardManager. (flutter/engine#56020)
2024-10-23 bdero@google.com [Flutter GPU] Fix assert failure in createDeviceBufferWithCopy. (flutter/engine#56039)
2024-10-22 skia-flutter-autoroll@skia.org Roll Dart SDK from 8de85635d731 to 20470aaa17be (4 revisions) (flutter/engine#56038)
2024-10-22 ditman@gmail.com [web] Remove old futureToPromise. (flutter/engine#55847)
2024-10-22 737941+loic-sharma@users.noreply.github.com [dart:ui] Improve Clip's docs (flutter/engine#55978)
2024-10-22 jonahwilliams@google.com [Impeller] flush thread local resources during toImage/toImageSync. (flutter/engine#56037)
2024-10-22 kpsroka@users.noreply.github.com [canvaskit] Makes access to CkSurface null-safer (flutter/engine#54895)

Also rolling transitive DEPS:
  fuchsia/sdk/core/linux-amd64 from xPbin_33tT-_ to NxrFCTty8wV4

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 codefu@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
nick9822 pushed a commit to nick9822/flutter that referenced this pull request Dec 18, 2024
Handles exceptions coming from `MakeSWCanvasSurface` and `MakeOffscreenSWCanvasSurface`.

Also makes surface size a member of `CkSurface` to make sure that it's always in sync with `surface`.

Fixes flutter#154402

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NPE in Surface.createOrUpdateSurface

3 participants