Library: fewer temporaries per window in Begin() (scalar TitleBarRect()/CollapseButton() rects, viewport clip and contains tests, visibility rect, CalcWindowSizeAfterConstraint() writes its own copy, title bar rect only built for a hovered window): 21.4 -> 18.8 KB/frame allocated for one window of buttons/sliders, 46.6 -> 42.5 KB/frame in the Studio bench scene
Draw data unchanged.
This commit is contained in:
1 parent
8511a75e9e
commit
883af9559d
2 files changed
+21
-11
No files matched your search
+1
-1
@@ -2993,7 +2993,7 @@ end
|
||||
--- @return ImRect
|
||||
--- @nodiscard
|
||||
function MT.ImGuiWindow:TitleBarRect()
|
||||
return ImRect(self.Pos, ImVec2(self.Pos.x + self.SizeFull.x, self.Pos.y + self.TitleBarHeight))
|
||||
return ImRect(self.Pos.x, self.Pos.y, self.Pos.x + self.SizeFull.x, self.Pos.y + self.TitleBarHeight) -- [Luau] scalar form: no temporary ImVec2
|
||||
end
|
||||
|
||||
--- @return ImRect
|
||||
|
||||
Reference in new issue
Block a user