Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions impeller/typographer/rectangle_packer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ class SkylineRectanglePacker final : public RectanglePacker {
~SkylineRectanglePacker() final {}

void reset() final {
areaSoFar_ = 0;
area_so_far_ = 0;
skyline_.clear();
skyline_.push_back(SkylineSegment{0, 0, this->width()});
}

bool addRect(int w, int h, IPoint16* loc) final;

float percentFull() const final {
return areaSoFar_ / ((float)this->width() * this->height());
return area_so_far_ / ((float)this->width() * this->height());
}

private:
Expand All @@ -42,7 +42,7 @@ class SkylineRectanglePacker final : public RectanglePacker {

std::vector<SkylineSegment> skyline_;

int32_t areaSoFar_;
int32_t area_so_far_;

// Can a width x height rectangle fit in the free space represented by
// the skyline segments >= 'skylineIndex'? If so, return true and fill in
Expand Down Expand Up @@ -84,7 +84,7 @@ bool SkylineRectanglePacker::addRect(int width, int height, IPoint16* loc) {
loc->x_ = bestX;
loc->y_ = bestY;

areaSoFar_ += width * height;
area_so_far_ += width * height;
return true;
}

Expand Down