Columns: Lower overhead on column switches and switching to background channel (some stress tests in debug builds went 3->2 ms). (#125)

This change benefits Columns but was primarily made with Tables in mind.
This commit is contained in:
ocornut
2020-06-08 22:38:19 +02:00
parent 84862ec78e
commit 9b3ce494fd
4 changed files with 34 additions and 5 deletions

View File

@ -435,6 +435,7 @@ struct IMGUI_API ImRect
void ClipWithFull(const ImRect& r) { Min = ImClamp(Min, r.Min, r.Max); Max = ImClamp(Max, r.Min, r.Max); } // Full version, ensure both points are fully clipped.
void Floor() { Min.x = IM_FLOOR(Min.x); Min.y = IM_FLOOR(Min.y); Max.x = IM_FLOOR(Max.x); Max.y = IM_FLOOR(Max.y); }
bool IsInverted() const { return Min.x > Max.x || Min.y > Max.y; }
ImVec4 ToVec4() const { return ImVec4(Min.x, Min.y, Max.x, Max.y); }
};
// Helper: ImBitArray