-
Notifications
You must be signed in to change notification settings - Fork 6k
properly namespace flutter software pixel formats #38847
Conversation
Some questions:
|
- rename `kGray8 --> kFlutterSoftwarePixelFormatGray8` - rename `kRGB565 --> kFlutterSoftwarePixelFormatRGB565` - etc.
8bfb05e
to
2c534dc
Compare
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.
This is a breaking API change to the one public header with stability guarantees.
@chinmaygarde I thought it was only ABI stability guarantees, not API stability guarantees? The info at the top explicitly states renaming enum members is allowed, as long as the associated values don't change: engine/shell/platform/embedder/embedder.h Lines 29 to 34 in 2c534dc
And I think API breakage is less of a concern in this case, since this is a fairly niche API which isn't even present on stable yet. |
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.
I thought it was only ABI stability guarantees, not API stability guarantees?
We still try to minimize them as much as possible. There are other instances where we could change things if we could. Like kSuccess
for instance. I remember changing just these fields to be deprecated caused a whole bunch of failures. We could have instead aborted engine launch with an error message or added compiler warnings about the deprecation.
And I think API breakage is less of a concern in this case, since this is a fairly niche API which isn't even present on stable yet.
I think this is compelling though. I'm LGTM-ing based on this but I am also not sure who all are affected. I couldn't find users of this in the locations I know of. If you know if any, can you ping them if able? Just so we minimize the disruption.
If you think the disruption is manageable, go for it. If not, I trust you to hold 🙏🏽
Makes sense. Yeah
I only introduced this change because we had an iMX6 lying around that had no GPU and could only scanout RGB565, and even we haven't used this API yet :) I don't know any other embedders that do. Generally, no common embedders seem to use / support flutters' software rendering backend. I think in this case the disruption is manageable. Would it be possible to cherry-pick this change into whatever branch becomes the next stable? (If the forkpoint has already happened) Otherwise, if the next stable releases with the old |
Ah, I guess not 😄 Maybe it's better to choose a different approach now, perhaps something like this: typedef enum {
kFlutterSoftwarePixelFormatGray8,
kFlutterSoftwarePixelFormatRGB565,
// ...
#ifdef FLUTTER_DEPRECATED_SOFTWARE_PIXEL_FORMAT_NAMES
kGray8 = kFlutterSoftwarePixelFormatGray8,
kRGB565 = kFlutterSoftwarePixelFormatRGB565,
// ...
#endif
} FlutterSoftwarePixelFormat; People will still get a build breakage if they happen to use the old names, but at least it's easy to fix (just define |
In that case, we should just land it. |
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.
RSLGTM
…119306) * efe7de058 properly namespace flutter software pixel formats (flutter/engine#38847) * f1a574675 Roll Skia from ba4721319a92 to 091ec9bdcf9b (12 revisions) (flutter/engine#39177) * 79c958fc7 Roll Dart SDK from 4a8615b7e3ed to dcdd3fbb3116 (1 revision) (flutter/engine#39178)
Renames the
FlutterSoftwarePixelFormat
enum values offlutter_embedder.h
:Fixes flutter/flutter#118247.
Pre-launch Checklist
///
).