BufferSlotArray.cs 726 B

12345678910111213141516171819202122232425262728
  1. namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
  2. {
  3. class BufferSlotArray
  4. {
  5. // TODO: move to BufferQueue
  6. public const int NumBufferSlots = 0x40;
  7. public const int MaxAcquiredBuffers = NumBufferSlots - 2;
  8. public const int InvalidBufferSlot = -1;
  9. private BufferSlot[] _raw = new BufferSlot[NumBufferSlots];
  10. public BufferSlotArray()
  11. {
  12. for (int i = 0; i < _raw.Length; i++)
  13. {
  14. _raw[i] = new BufferSlot();
  15. }
  16. }
  17. public BufferSlot this[int index]
  18. {
  19. get => _raw[index];
  20. set => _raw[index] = value;
  21. }
  22. public int Length => NumBufferSlots;
  23. }
  24. }