Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Prev Previous commit
Next Next commit
++
  • Loading branch information
jonahwilliams committed Sep 13, 2024
commit 7f4a2c73c7c7546a5673c7c20701e11bdb1c3146
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