Roblox backend: faster unchanged check: CompareDrawList compares vertices as 4 f64 + col (3x fewer reads), indices 4 per step; a moved list's snapshot is shifted in place (ShiftSnapshot) instead of re-snapshotted from another list's Cmd* data

This commit is contained in:
4DBug committed 2026-10-20 13:56:21 -05:00
1 parent 62b8296f0c
commit c1325dd59c
2 files changed
+52 -10

No files matched your search

+2 -7
View File
@@ -14,6 +14,7 @@ local EditableImages, PB, PE, GetBackendData, UpdateTexture = Textures.EditableI
Textures.GetBackendData, Textures.UpdateTexture
local GetLayer, HideLayer, GetTile, DestroyLayerSet, Snapshot, CompareDrawList, ShiftLayer = Layers.GetLayer,
Layers.HideLayer, Layers.GetTile, Layers.DestroyLayerSet, Layers.Snapshot, Layers.CompareDrawList, Layers.ShiftLayer
local ShiftSnapshot = Layers.ShiftSnapshot
local CmdUnclipped, CmdKind, CmdBoundsX0, CmdBoundsY0, CmdBoundsX1, CmdBoundsY1 = Layers.CmdUnclipped, Layers.CmdKind,
Layers.CmdBoundsX0, Layers.CmdBoundsY0, Layers.CmdBoundsX1, Layers.CmdBoundsY1
local CLIP_PAD = Layers.CLIP_PAD
@@ -533,13 +534,7 @@ local function ReuseDrawList(BackendData, set, draw_list, same, sdx, sdy, z, ox,
end
end
end
if same == 2 then
Snapshot(set, draw_list, ox, oy, ScreenWidth, ScreenHeight)
set.SnapExtentX0 += sdx
set.SnapExtentY0 += sdy
set.SnapExtentX1 += sdx
set.SnapExtentY1 += sdy
end
if same == 2 then ShiftSnapshot(set, draw_list, sdx, sdy) end
set.LastUsed = BackendData.FrameNo
return PlaceOverlays(BackendData, draw_list, z, ox, oy)
end