goodbye lag

This commit is contained in:
2025-12-21 07:26:37 +09:00
parent 03105e0755
commit 779ff06981
2 changed files with 12 additions and 8 deletions

View File

@@ -126,11 +126,11 @@ public sealed class TextureMetadataHelper
private const string TextureSegment = "/texture/"; private const string TextureSegment = "/texture/";
private const string MaterialSegment = "/material/"; private const string MaterialSegment = "/material/";
private const uint NormalSamplerId = 0x0C5EC1F1u; private const uint NormalSamplerId = ShpkFile.NormalSamplerId;
private const uint IndexSamplerId = 0x565F8FD8u; private const uint IndexSamplerId = ShpkFile.IndexSamplerId;
private const uint SpecularSamplerId = 0x2B99E025u; private const uint SpecularSamplerId = ShpkFile.SpecularSamplerId;
private const uint DiffuseSamplerId = 0x115306BEu; private const uint DiffuseSamplerId = ShpkFile.DiffuseSamplerId;
private const uint MaskSamplerId = 0x8A4E82B6u; private const uint MaskSamplerId = ShpkFile.MaskSamplerId;
public TextureMetadataHelper(ILogger<TextureMetadataHelper> logger, IDataManager dataManager) public TextureMetadataHelper(ILogger<TextureMetadataHelper> logger, IDataManager dataManager)
{ {

View File

@@ -4,8 +4,8 @@ using Dalamud.Interface.Utility.Raii;
using LightlessSync.UI.Handlers; using LightlessSync.UI.Handlers;
using LightlessSync.UI.Models; using LightlessSync.UI.Models;
using System.Collections.Immutable; using System.Collections.Immutable;
using LightlessSync.UI;
using LightlessSync.UI.Style; using LightlessSync.UI.Style;
using OtterGui.Text;
namespace LightlessSync.UI.Components; namespace LightlessSync.UI.Components;
@@ -113,9 +113,13 @@ public abstract class DrawFolderBase : IDrawFolder
using var indent = ImRaii.PushIndent(_uiSharedService.GetIconSize(FontAwesomeIcon.EllipsisV).X + ImGui.GetStyle().ItemSpacing.X, false); using var indent = ImRaii.PushIndent(_uiSharedService.GetIconSize(FontAwesomeIcon.EllipsisV).X + ImGui.GetStyle().ItemSpacing.X, false);
if (DrawPairs.Any()) if (DrawPairs.Any())
{ {
foreach (var item in DrawPairs) using var clipper = ImUtf8.ListClipper(DrawPairs.Count, ImGui.GetFrameHeightWithSpacing());
while (clipper.Step())
{ {
item.DrawPairedClient(); for (var i = clipper.DisplayStart; i < clipper.DisplayEnd; i++)
{
DrawPairs[i].DrawPairedClient();
}
} }
} }
else else