/// <summary>
		/// sets the provided buffer as pending. takes control of the supplied buffer
		/// </summary>
		public void SetPending(DisplaySurface newPending)
		{
			lock (this)
			{
				if (Pending != null) ReleasedSurfaces.Enqueue(Pending);
				Pending = newPending;
				IsPending = true;
			}
		}
Esempio n. 2
0
 /// <summary>
 /// sets the provided buffer as pending. takes control of the supplied buffer
 /// </summary>
 public void SetPending(DisplaySurface newPending)
 {
     lock (this)
     {
         if (Pending != null)
         {
             ReleasedSurfaces.Enqueue(Pending);
         }
         Pending   = newPending;
         IsPending = true;
     }
 }
		/// <summary>
		/// returns the current buffer, making the most recent pending buffer (if there is such) as the new current first.
		/// </summary>
		public DisplaySurface GetCurrent()
		{
			lock (this)
			{
				if (IsPending)
				{
					if (Current != null) ReleasedSurfaces.Enqueue(Current);
					Current = Pending;
					Pending = null;
					IsPending = false;
				}
			}
			return Current;
		}
Esempio n. 4
0
 /// <summary>
 /// returns the current buffer, making the most recent pending buffer (if there is such) as the new current first.
 /// </summary>
 public DisplaySurface GetCurrent()
 {
     lock (this)
     {
         if (IsPending)
         {
             if (Current != null)
             {
                 ReleasedSurfaces.Enqueue(Current);
             }
             Current   = Pending;
             Pending   = null;
             IsPending = false;
         }
     }
     return(Current);
 }
Esempio n. 5
0
 public void ReleaseSurface(DisplaySurface surface)
 {
     lock (this) ReleasedSurfaces.Enqueue(surface);
 }
		public void ReleaseSurface(DisplaySurface surface)
		{
			lock (this) ReleasedSurfaces.Enqueue(surface);
		}