Removed unnecessary locks when updating grass/path graphics - Improved apparent performance of grass painting when FPS is high

This commit is contained in:
dexy 2018-12-05 18:26:28 +11:00
parent a7e2c7a0b6
commit 05d3e37394
2 changed files with 8 additions and 8 deletions

View File

@ -245,7 +245,7 @@ namespace CodeWalker.Project.Panels
var wf = ProjectForm.WorldForm;
if (wf == null) return;
lock (wf.RenderSyncRoot)
//lock (wf.RenderSyncRoot)
{
CurrentBatch.CreateInstancesAtMouse(
CurrentBatch,
@ -270,7 +270,7 @@ namespace CodeWalker.Project.Panels
var wf = ProjectForm.WorldForm;
if (wf == null) return;
var changed = false;
lock (wf.RenderSyncRoot)
//lock (wf.RenderSyncRoot)
{
if (CurrentBatch.EraseInstancesAtMouse(
CurrentBatch,

View File

@ -1744,7 +1744,7 @@ namespace CodeWalker
{
space.BuildYndVerts(ynd);
}
lock (Renderer.RenderSyncRoot)
//lock (Renderer.RenderSyncRoot)
{
Renderer.Invalidate(ynd);
}
@ -1766,7 +1766,7 @@ namespace CodeWalker
ynv.UpdateTriangleVertices();
ynv.BuildBVH();
lock (Renderer.RenderSyncRoot)
//lock (Renderer.RenderSyncRoot)
{
Renderer.Invalidate(ynv);
}
@ -1802,7 +1802,7 @@ namespace CodeWalker
//{
// //space.BuildYndVerts(ynd);
//}
lock (Renderer.RenderSyncRoot)
//lock (Renderer.RenderSyncRoot)
{
Renderer.Invalidate(tt);
}
@ -1823,7 +1823,7 @@ namespace CodeWalker
scenario.BuildVertices();
lock (Renderer.RenderSyncRoot)
//lock (Renderer.RenderSyncRoot)
{
Renderer.Invalidate(scenario);
}
@ -1831,7 +1831,7 @@ namespace CodeWalker
public void UpdateGrassBatchGraphics(YmapGrassInstanceBatch grassBatch)
{
lock (Renderer.RenderSyncRoot)
//lock (Renderer.RenderSyncRoot)
{
Renderer.Invalidate(grassBatch);
}
@ -6148,7 +6148,7 @@ namespace CodeWalker
ControlBrushTimer++;
if (ControlBrushTimer > (Input.ShiftPressed ? 5 : 10))
{
lock (Renderer.RenderSyncRoot)
//lock (Renderer.RenderSyncRoot)
{
if (ProjectForm != null && MouseLButtonDown)
{