mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-11-27 03:32:23 -05:00
Blocks should be synchronized on read-only fields (#5212)
* Blocks should be synchronized on read-only fields * more readonlys * fix alignment * more * Update ISelfController.cs * simplify new * simplify new
This commit is contained in:
@@ -34,7 +34,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
public bool EnableExternalEvent;
|
||||
public int MaxBufferCountCached;
|
||||
|
||||
public readonly object Lock = new object();
|
||||
public readonly object Lock = new();
|
||||
|
||||
private KEvent _waitBufferFreeEvent;
|
||||
private KEvent _frameAvailableEvent;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
private uint _currentCallbackTicket;
|
||||
private uint _callbackTicket;
|
||||
|
||||
private readonly object _callbackLock = new object();
|
||||
private readonly object _callbackLock = new();
|
||||
|
||||
public BufferQueueProducer(BufferQueueCore core, ITickSource tickSource)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
|
||||
protected BufferQueueConsumer Consumer;
|
||||
|
||||
protected readonly object Lock = new object();
|
||||
protected readonly object Lock = new();
|
||||
|
||||
private IConsumerListener _listener;
|
||||
|
||||
@@ -168,7 +168,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
|
||||
Slot slot = Slots[slotIndex];
|
||||
|
||||
// TODO: Check this. On Android, this checks the "handle". I assume NvMapHandle is the handle, but it might not be.
|
||||
// TODO: Check this. On Android, this checks the "handle". I assume NvMapHandle is the handle, but it might not be.
|
||||
return !slot.GraphicBuffer.IsNull && slot.GraphicBuffer.Object.Buffer.Surfaces[0].NvMapHandle == graphicBuffer.Object.Buffer.Surfaces[0].NvMapHandle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
||||
private int _swapInterval;
|
||||
private int _swapIntervalDelay;
|
||||
|
||||
private readonly object Lock = new object();
|
||||
private readonly object Lock = new();
|
||||
|
||||
public long RenderLayerId { get; private set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user