-
Notifications
You must be signed in to change notification settings - Fork 6k
[Impeller] geometry changes to support line/point style. #56340
Conversation
impeller/geometry/path_component.h
Outdated
@@ -71,7 +71,8 @@ class StripVertexWriter : public VertexWriter { | |||
class GLESVertexWriter : public VertexWriter { | |||
public: | |||
explicit GLESVertexWriter(std::vector<Point>& points, | |||
std::vector<uint16_t>& indices); | |||
std::vector<uint16_t>& indices, | |||
bool line_strip = false); |
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.
Can you add a docstring for what line_strip
is? Maybe just link to tessellator's documentation.
impeller/tessellator/tessellator.h
Outdated
/// @return A point vector containing the vertices in triangle strip format. | ||
/// Matrix::GetMaxBasisLengthXY of the CTM applied to | ||
/// the path for rendering. | ||
/// @param[in] line_strip if true, generates line strip geometry instead of a |
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.
What is a "line strip"? A triangle strip that makes a line?
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.
A line strip is a GL_LINE_STRIP geometry. How about a link to the primitive type?
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 don't understand why a tessellator would be generating a line strip, tessellation means converting something to packed polygons (triangles in our case). I see, this is doing stuff like converting a bezier path to a line strip?
Yea, mentioning GL_LINE_STRIP would help to distinguish it from a line make with a triangle strip. Especially since a generating a GL_LINE_STRIP isn't technically tessellation.
The brief for this method also explicitly says it creates a triangle fan structure, that should be updated.
Now that I think of it. Don't you think this would be better off as it's own function instead of a bool parameter? Generally it's advised to make procedures do 1 thing. We can share the code in a helper function.
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.
Yeah I agree with you, a separate method would be better in this case. I suppose since its a line primitive its not exactly tessellation but primitive generation :)
point_buffer.GetBuffer()->Flush(point_buffer.GetRange()); | ||
index_buffer.GetBuffer()->Flush(index_buffer.GetRange()); |
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.
Is there a test for these changes?
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 don't have a test case for this, except for the fact that it may or may not work on swiftshader. I don't want to add a mock test for these, instead I think switching to the point arena like we did for strokes is probably better?
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.
So, you're saying if this wasn't here the goldens would look wrong? Sounds good to me.
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.
It would be racy :(
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.
lgtm! thanks
auto label is removed for flutter/engine/56340, due to - The status or check suite Mac mac_ios_engine has failed. Please fix the issues identified (or deflake) before re-applying this label. |
impeller/geometry/path_component.h
Outdated
|
||
std::pair<size_t, size_t> GetVertexCount() const; | ||
|
||
const std::vector<Point>& GetOveriszedBuffer() const; |
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.
typo Overiszed
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.
Fixed, thanks!
…158485) flutter/engine@7b3eacd...35041f1 2024-11-11 skia-flutter-autoroll@skia.org Roll Dart SDK from a393f3ed040a to 69170fac244c (1 revision) (flutter/engine#56513) 2024-11-11 chris@bracken.jp iOS,macOS: Refactor TestMetalContext for ARC (flutter/engine#56510) 2024-11-11 jonahwilliams@google.com [Impeller] geometry changes to support line/point style. (flutter/engine#56340) 2024-11-11 skia-flutter-autoroll@skia.org Roll Skia from af6a4f9a85ee to 11046fd10394 (9 revisions) (flutter/engine#56508) 2024-11-11 jonahwilliams@google.com [Impeller] dont unnecessarily copy point data out of display list. (flutter/engine#56492) 2024-11-11 jonahwilliams@google.com [Impeller] fix line/polygon depth and GLES scissor state. (flutter/engine#56494) 2024-11-11 jason-simmons@users.noreply.github.com Do not stop flutter_tester if microtasks are still pending (flutter/engine#56432) 2024-11-11 skia-flutter-autoroll@skia.org Roll Skia from 261316c10484 to af6a4f9a85ee (5 revisions) (flutter/engine#56505) 2024-11-11 skia-flutter-autoroll@skia.org Roll Dart SDK from 4ea43aa234a4 to a393f3ed040a (1 revision) (flutter/engine#56506) 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 jsimmons@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
…ine#56340) Split off from flutter/engine#55230 . Adds getter that tracks if a Path is a single contour. ################################ flutter#152702
Split off from #55230 . Adds getter that tracks if a Path is a single contour.
################################
flutter/flutter#152702