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

Conversation

@gaaclarke
Copy link
Member

@gaaclarke gaaclarke commented Oct 10, 2023

issue: flutter/flutter#135245

This is a first step. Next we'll implement a retry.

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.

@gaaclarke gaaclarke force-pushed the retry-tobytedata branch 2 times, most recently from fef13eb to 3da3a9c Compare October 11, 2023 16:19
@gaaclarke gaaclarke changed the title [Impeller] started retrying toByteData if the gpu isn't available. [Impeller] Started throwing errors if dart:ui/Image.toByteData fails Oct 11, 2023
@gaaclarke gaaclarke marked this pull request as ready for review October 11, 2023 17:45
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM with some nits

fml/status_or.h Outdated

namespace fml {

/// TODO(): Replace with absl::StatusOr.
Copy link
Contributor

Choose a reason for hiding this comment

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

In place (or in addition to) a todo, it would be nice to document or link to documents on how this should be used.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

auto texture = dl_image->impeller_texture();

if (impeller_context == nullptr) {
FML_LOG(ERROR) << "Impeller context was null.";
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the FML_LOG(ERROR) if we're surfacing the exact error message now?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

if (encoded != null) {
completer.complete(encoded.buffer.asByteData());
} else {
completer.completeError(Exception(error ?? 'unknown error'));
Copy link
Contributor

Choose a reason for hiding this comment

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

ubernit: unknown exception

Copy link
Member Author

Choose a reason for hiding this comment

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

done

.SetIfTrue([&encode_task] { encode_task(nullptr); })
.SetIfTrue([&encode_task] {
encode_task(
fml::Status(fml::StatusCode::kUnavailable, "gpu unavailable"));
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: "Gpu unavailable." . Most of the other errors seem formatted this way.

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@gaaclarke
Copy link
Member Author

rebase to flush out fuchsia infra failures now that the tree is green

@gaaclarke
Copy link
Member Author

@jonahwilliams I had to tweak painting.dart to get the tests passing. There was some wild stuff going on with zones. Let me know if you want to take another look.

@jonahwilliams
Copy link
Contributor

With apologies to @bdero

82e6ko

Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

Still LGTM

@gaaclarke gaaclarke merged commit 93f02f7 into flutter:main Oct 13, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 13, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Oct 13, 2023
…136546)

flutter/engine@60968c8...93f02f7

2023-10-13 [email protected] [Impeller] Started throwing errors if dart:ui/Image.toByteData fails (flutter/engine#46738)
2023-10-13 [email protected] Roll Skia from e566db061ce8 to 3acf82dcc479 (2 revisions) (flutter/engine#46883)
2023-10-13 [email protected] Fix forward declare and some deprecated enums (flutter/engine#46882)
2023-10-13 [email protected] Roll Skia from c640eeed2695 to e566db061ce8 (1 revision) (flutter/engine#46881)
2023-10-13 [email protected] Update to use GrDirectContexts::MakeVulkan (flutter/engine#46878)

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 [email protected],[email protected],[email protected] 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
@@ -0,0 +1,81 @@
// Copyright 2013 The Flutter Authors. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Passer-by comment from updating the internal build - since this is a new file, were we supposed to update BUILD.gn to specify it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm seeing build errors related to being unable to find status_or.h. sponge2/34a90d3c-29af-45ca-952f-6e9733c86612

Copy link
Contributor

@dkwingsmt dkwingsmt Oct 19, 2023

Choose a reason for hiding this comment

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

I've filed an issue: flutter/flutter#136858

harryterkelsen pushed a commit that referenced this pull request Oct 23, 2023
…46738)

issue: flutter/flutter#135245

This is a first step.  Next we'll implement a retry.

## 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 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].
- [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/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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

No open projects
Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants