public override void DrawIndexedBitmap(IndexedBitmapBuffer src, int dstX, int dstY, int srcX, int srcY)
        {
            if (src == null)
            {
                throw new ArgumentNullException(nameof(src));
            }
            if (src is IndexedGPUBitmapBuffer b)
            {
                if (dstX < 0)
                {
                    dstX = 0;
                }
                if (dstY < 0)
                {
                    dstY = 0;
                }
                if (dstX >= Width)
                {
                    dstX = Width - 1;
                }
                if (dstY >= Height)
                {
                    dstY = Height - 1;
                }

                if (srcX < 0)
                {
                    srcX = 0;
                }
                if (srcY < 0)
                {
                    srcY = 0;
                }
                if (srcX >= b.Width)
                {
                    srcX = b.Width - 1;
                }
                if (srcY >= b.Height)
                {
                    srcY = b.Height - 1;
                }

                int w = Math.Min(Width - dstX, b.Width - srcX);
                int h = Math.Min(Height - dstY, b.Height - srcY);

                DrawIndexedBitmapBufferWithOffsetByteKernel.Execute(new Index2(w, h), Buffer, b.Buffer,
                                                                    dstX, dstY, srcX, srcY);

                Dirty();

                RequireCopyTo = true;
            }
            else
            {
                throw new ArgumentNotIndexedGPUBitmapBufferException(nameof(src));
            }
        }
 public abstract void DrawIndexedBitmap(IndexedBitmapBuffer src, int dstX, int dstY, int srcX, int srcY);
 public virtual void DrawIndexedBitmap(IndexedBitmapBuffer src, int dstX, int dstY)
 {
     DrawIndexedBitmap(src, dstX, dstY, 0, 0);
 }
 public virtual void DrawIndexedBitmap(IndexedBitmapBuffer src)
 {
     DrawIndexedBitmap(src, 0, 0, 0, 0);
 }