[paint-bounded] Remove one vector

Doesn't make things faster though because of the scratch pattern.
This commit is contained in:
Behdad Esfahbod committed 2025-04-20 04:28:28 -06:00
1 parent 78822b6336
commit 7aa3ab933b
1 file changed
+5 -8
+5 -8
View File
@@ -37,10 +37,8 @@ struct hb_paint_bounded_context_t
{
void clear ()
{
clips.clear ();
clips = 0;
groups.clear ();
clips.push (false);
groups.push (true);
}
@@ -56,12 +54,12 @@ struct hb_paint_bounded_context_t
void push_clip ()
{
clips.push (true);
clips++;
}
void pop_clip ()
{
clips.pop ();
clips--;
}
void push_group ()
@@ -99,15 +97,14 @@ struct hb_paint_bounded_context_t
void paint ()
{
const bool &clip = clips.tail ();
bool &group = groups.tail ();
if (!clip)
if (clips <= 0)
group = false;
}
protected:
hb_vector_t<bool> clips; // true if clipped
int clips; // number of active clips
hb_vector_t<bool> groups; // true if bounded
};