mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-18 20:56:28 +01:00
Canvas: re-use Solver as much as possible, with possible (but not substantive) speedup; remove debug output
This commit is contained in:
parent
815eb82882
commit
aa62460081
9 changed files with 85 additions and 48 deletions
|
|
@ -50,8 +50,8 @@ public:
|
|||
BoxConstrainedItem* pack_start (Item*, PackOptions primary_axis_packing = PackOptions (0), PackOptions secondary_axis_packing = PackOptions (PackExpand|PackFill));
|
||||
BoxConstrainedItem* pack_end (Item*, PackOptions primary_axis_packing = PackOptions (0), PackOptions secondary_axis_packing = PackOptions (PackExpand|PackFill));
|
||||
|
||||
void add_vertical_box_constraints (kiwi::Solver& solver, BoxConstrainedItem* ci, BoxConstrainedItem* prev, double expanded_size, double main_dimenion, double second_dimension, double alloc_dimension);
|
||||
void add_horizontal_box_constraints (kiwi::Solver& solver, BoxConstrainedItem* ci, BoxConstrainedItem* prev, double expanded_size, double main_dimenion, double second_dimension, double alloc_dimension);
|
||||
void add_vertical_box_constraints (kiwi::Solver& solver, BoxConstrainedItem* ci, BoxConstrainedItem* prev, double main_dimenion, double second_dimension, kiwi::Variable& alloc_var);
|
||||
void add_horizontal_box_constraints (kiwi::Solver& solver, BoxConstrainedItem* ci, BoxConstrainedItem* prev, double main_dimenion, double second_dimension, kiwi::Variable& alloc_var);
|
||||
|
||||
void set_collapse_on_hide (bool);
|
||||
void set_homogenous (bool);
|
||||
|
|
@ -75,12 +75,14 @@ public:
|
|||
double _right_margin;
|
||||
|
||||
void child_changed (bool bbox_changed);
|
||||
void update_constraints ();
|
||||
|
||||
private:
|
||||
typedef std::list<BoxConstrainedItem*> Order;
|
||||
Order order;
|
||||
bool collapse_on_hide;
|
||||
bool homogenous;
|
||||
kiwi::Variable expanded_item_size;
|
||||
|
||||
BoxConstrainedItem* pack (Item*, PackOptions primary_axis_packing, PackOptions secondary_axis_packing);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -62,12 +62,15 @@ public:
|
|||
ConstrainedItemMap constrained_map;
|
||||
typedef std::list<kiwi::Constraint> ConstraintList;
|
||||
ConstraintList constraint_list;
|
||||
|
||||
kiwi::Solver _solver;
|
||||
bool in_alloc;
|
||||
bool _need_constraint_update;
|
||||
|
||||
void add_constrained_internal (Item*, ConstrainedItem*);
|
||||
|
||||
void add_constraints (kiwi::Solver&, ConstrainedItem*) const;
|
||||
|
||||
virtual void update_constraints ();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@ protected:
|
|||
void prepare_for_render_children (Rect const & area) const;
|
||||
|
||||
Duple scroll_offset() const;
|
||||
public:
|
||||
Duple position_offset() const;
|
||||
|
||||
private:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue