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

[Impeller] Add debug ToString methods to render targets. #41221

Merged
merged 1 commit into from
Apr 17, 2023

Conversation

chinmaygarde
Copy link
Member

Also fixes and issue where SPrintF would only consider strings 64 bytes or smaller.

Copy link
Member

@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!

Comment on lines 12 to +27
std::string SPrintF(const char* format, ...) {
std::string ret_val;
va_list list;
va_list list2;
va_start(list, format);
char buffer[64] = {0};
::vsnprintf(buffer, sizeof(buffer), format, list);
va_copy(list2, list);
if (auto string_length = ::vsnprintf(nullptr, 0, format, list);
string_length >= 0) {
auto buffer = reinterpret_cast<char*>(::malloc(string_length + 1));
::vsnprintf(buffer, string_length + 1, format, list2);
ret_val = std::string{buffer, static_cast<size_t>(string_length)};
::free(buffer);
}
va_end(list2);
va_end(list);
return buffer;
return ret_val;
Copy link
Member

Choose a reason for hiding this comment

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

I'll take your word for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Are you talking about the dubious var name?

Copy link
Member

@bdero bdero left a comment

Choose a reason for hiding this comment

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

LGTM

@chinmaygarde chinmaygarde self-assigned this Apr 15, 2023
@chinmaygarde chinmaygarde added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2023
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2023
@auto-submit
Copy link
Contributor

auto-submit bot commented Apr 17, 2023

auto label is removed for flutter/engine, pr: 41221, due to - The status or check suite Mac mac_unopt has failed. Please fix the issues identified (or deflake) before re-applying this label.

Also fixes and issue where SPrintF would only consider strings 64 bytes
or smaller.
@chinmaygarde chinmaygarde added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2023
@chinmaygarde
Copy link
Member Author

The CI flake has been reported in sheriffs chat.

@auto-submit auto-submit bot merged commit 9235ca6 into flutter:main Apr 17, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Apr 18, 2023
…125004)

flutter/engine@20034a8...4a603aa

2023-04-17 magder@google.com Remove 'Mac mac_unopt' in favor of Linux (flutter/engine#41226)
2023-04-17 chinmaygarde@google.com [Impeller] Add debug ToString methods to render targets. (flutter/engine#41221)

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 jacksongardner@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
@chinmaygarde chinmaygarde deleted the tostring branch March 9, 2024 00:27
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 e: impeller
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants