Remove array for visited_paint.

This commit is contained in:
Garret Rieger 2021-05-12 14:05:34 -07:00
parent e59ffe5482
commit de0eba20ed
1 changed files with 5 additions and 7 deletions

View File

@ -58,10 +58,10 @@ struct hb_colrv1_closure_context_t :
bool paint_visited (const void *paint) bool paint_visited (const void *paint)
{ {
hb_codepoint_t delta = (hb_codepoint_t) ((uintptr_t) paint - (uintptr_t) base); hb_codepoint_t delta = (hb_codepoint_t) ((uintptr_t) paint - (uintptr_t) base);
if (visited_paint->has (delta)) if (visited_paint.has (delta))
return true; return true;
visited_paint->add (delta); visited_paint.add (delta);
return false; return false;
} }
@ -79,7 +79,7 @@ struct hb_colrv1_closure_context_t :
public: public:
const void *base; const void *base;
hb_set_t visited_paint[1]; hb_set_t visited_paint;
hb_set_t *glyphs; hb_set_t *glyphs;
hb_set_t *layer_indices; hb_set_t *layer_indices;
hb_set_t *palette_indices; hb_set_t *palette_indices;
@ -93,8 +93,6 @@ struct hb_colrv1_closure_context_t :
layer_indices (layer_indices_), layer_indices (layer_indices_),
palette_indices (palette_indices_) palette_indices (palette_indices_)
{} {}
~hb_colrv1_closure_context_t () { hb_set_clear (visited_paint); }
}; };
struct LayerRecord struct LayerRecord
@ -259,7 +257,7 @@ struct CompositeMode : HBUINT8
COMPOSITE_DEST_ATOP = 10, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_dstatop COMPOSITE_DEST_ATOP = 10, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_dstatop
COMPOSITE_XOR = 11, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_xor COMPOSITE_XOR = 11, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_xor
COMPOSITE_PLUS = 12, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_plus COMPOSITE_PLUS = 12, // https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_plus
// Blend modes // Blend modes
// https://www.w3.org/TR/compositing-1/#blending // https://www.w3.org/TR/compositing-1/#blending
COMPOSITE_SCREEN = 13, // https://www.w3.org/TR/compositing-1/#blendingscreen COMPOSITE_SCREEN = 13, // https://www.w3.org/TR/compositing-1/#blendingscreen
@ -273,7 +271,7 @@ struct CompositeMode : HBUINT8
COMPOSITE_DIFFERENCE = 21, // https://www.w3.org/TR/compositing-1/#blendingdifference COMPOSITE_DIFFERENCE = 21, // https://www.w3.org/TR/compositing-1/#blendingdifference
COMPOSITE_EXCLUSION = 22, // https://www.w3.org/TR/compositing-1/#blendingexclusion COMPOSITE_EXCLUSION = 22, // https://www.w3.org/TR/compositing-1/#blendingexclusion
COMPOSITE_MULTIPLY = 23, // https://www.w3.org/TR/compositing-1/#blendingmultiply COMPOSITE_MULTIPLY = 23, // https://www.w3.org/TR/compositing-1/#blendingmultiply
// Modes that, uniquely, do not operate on components // Modes that, uniquely, do not operate on components
// https://www.w3.org/TR/compositing-1/#blendingnonseparable // https://www.w3.org/TR/compositing-1/#blendingnonseparable
COMPOSITE_HSL_HUE = 24, // https://www.w3.org/TR/compositing-1/#blendinghue COMPOSITE_HSL_HUE = 24, // https://www.w3.org/TR/compositing-1/#blendinghue