Skip to content

Commit

Permalink
++
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahwilliams committed Sep 13, 2024
1 parent 8accf3e commit 7f4a2c7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions impeller/geometry/path.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ void Path::EndContour(
poly_components.clear();

size_t previous_index = component_index - 1;
storage_offset -= VerbToOffset(path_components[previous_index]);

while (previous_index >= 0 && storage_offset >= 0) {
const auto& path_component = path_components[previous_index];
switch (path_component) {
Expand Down Expand Up @@ -371,9 +373,6 @@ Path::Polyline Path::CreatePolyline(
storage_offset -= VerbToOffset(ComponentType::kContour);
component_i--;
}
if (component_i > 0) {
storage_offset -= VerbToOffset(path_components[component_i - 1]);
}

if (!polyline.contours.empty()) {
polyline.contours.back().start_direction =
Expand Down

0 comments on commit 7f4a2c7

Please sign in to comment.