Fromatting cleanup for review

This commit is contained in:
Andy Adshead 2019-02-16 01:39:43 +00:00
parent f59f4b7d7f
commit 22198ee67c
5 changed files with 19 additions and 21 deletions

View file

@ -97,8 +97,8 @@ namespace Ryujinx.HLE.HOS.Services
Logger.PrintDebug(LogClass.KernelIpc, $"{service.GetType().Name}: {processRequest.Method.Name}");
ProfileConfig profile = Profiles.ServiceCall;
profile.SessionGroup = service.GetType().Name;
profile.SessionItem = processRequest.Method.Name;
profile.SessionGroup = service.GetType().Name;
profile.SessionItem = processRequest.Method.Name;
Profile.Begin(profile);
long result = processRequest(context);

View file

@ -14,7 +14,7 @@ namespace Ryujinx.Profiler
public int MaxLevel { get; set; } = 0;
// 19531225 = 5 seconds in ticks
public long History { get; set; } = 19531225;
public long History { get; set; } = 19531225;
// Controls
public NpadDebug Controls;

View file

@ -50,7 +50,6 @@ namespace Ryujinx.Profiler
// Depth of current timer,
// each begin call increments and each end call decrements
private int _depth;
public TimingInfo()
{

View file

@ -41,14 +41,11 @@ namespace Ryujinx.Profiler.UI
private ProfileButton[] _buttons;
private bool _initComplete = false;
private bool _visible = true;
private bool _visibleChanged = true;
private bool _viewportUpdated = true;
private bool _redrawPending = true;
private bool _displayGraph = true;
private bool _showInactive = true;
private bool _paused = false;
private bool _doStep = false;
@ -84,6 +81,7 @@ namespace Ryujinx.Profiler.UI
private bool _prevBackspaceDown = false;
private double _backspaceDownTime = 0;
// F35 used as no key
private Key _graphControlKey = Key.F35;
// Event management
@ -91,7 +89,6 @@ namespace Ryujinx.Profiler.UI
private double _processEventTimer;
private bool _profileUpdated = false;
private readonly object _profileDataLock = new object();
public ProfileWindow()
// Graphigs mode enables 2xAA
@ -553,9 +550,9 @@ namespace Ryujinx.Profiler.UI
// Totals
yHeight = FilterHeight + 2;
_fontService.DrawText($"{totalInstant / PerformanceCounter.TicksPerMillisecond:F3} ({totalCount})", xOffset, yHeight, TitleFontHeight);
_fontService.DrawText($"{totalAverage / PerformanceCounter.TicksPerMillisecond:F3}", 150 + xOffset, yHeight, TitleFontHeight);
_fontService.DrawText($"{totalTime / PerformanceCounter.TicksPerMillisecond:F3}", 260 + xOffset, yHeight, TitleFontHeight);
_fontService.DrawText($"{totalInstant / PerformanceCounter.TicksPerMillisecond:F3} ({totalCount})", xOffset, yHeight, TitleFontHeight);
_fontService.DrawText($"{totalAverage / PerformanceCounter.TicksPerMillisecond:F3}", 150 + xOffset, yHeight, TitleFontHeight);
_fontService.DrawText($"{totalTime / PerformanceCounter.TicksPerMillisecond:F3}", 260 + xOffset, yHeight, TitleFontHeight);
#endregion
}

View file

@ -23,7 +23,7 @@ namespace Ryujinx.Profiler.UI
{
maxInstant = Math.Max(maxInstant, kvp.Value.Instant);
maxAverage = Math.Max(maxAverage, kvp.Value.AverageTime);
maxTotal = Math.Max(maxTotal, kvp.Value.TotalTime);
maxTotal = Math.Max(maxTotal, kvp.Value.TotalTime);
}
GL.Enable(EnableCap.ScissorTest);
@ -33,8 +33,8 @@ namespace Ryujinx.Profiler.UI
// Instant
GL.Color3(Color.Blue);
float bottom = GetLineY(yOffset, LineHeight, LinePadding, true, verticalIndex++);
float top = bottom + barHeight;
float right = (float)entry.Value.Instant / maxInstant * width + xOffset;
float top = bottom + barHeight;
float right = (float)entry.Value.Instant / maxInstant * width + xOffset;
// Skip rendering out of bounds bars
if (top < 0 || bottom > Height)
@ -42,17 +42,18 @@ namespace Ryujinx.Profiler.UI
GL.Vertex2(xOffset, bottom);
GL.Vertex2(xOffset, top);
GL.Vertex2(right, top);
GL.Vertex2(right, top);
GL.Vertex2(right, top);
GL.Vertex2(right, bottom);
GL.Vertex2(right, top);
GL.Vertex2(right, bottom);
GL.Vertex2(xOffset, bottom);
// Average
GL.Color3(Color.Green);
top += barHeight;
top += barHeight;
bottom += barHeight;
right = (float)entry.Value.AverageTime / maxAverage * width + xOffset;
right = (float)entry.Value.AverageTime / maxAverage * width + xOffset;
GL.Vertex2(xOffset, bottom);
GL.Vertex2(xOffset, top);
GL.Vertex2(right, top);
@ -63,9 +64,10 @@ namespace Ryujinx.Profiler.UI
// Total
GL.Color3(Color.Red);
top += barHeight;
top += barHeight;
bottom += barHeight;
right = (float)entry.Value.TotalTime / maxTotal * width + xOffset;
right = (float)entry.Value.TotalTime / maxTotal * width + xOffset;
GL.Vertex2(xOffset, bottom);
GL.Vertex2(xOffset, top);
GL.Vertex2(right, top);