Exemple #1
0
        public Event EnqueueMapImage(Image image, bool blocking, MapFlags mapFlags, BufferCoordinates origin, BufferSize region, out long rowPitch, out long slicePitch, out IntPtr mappedPointer, params Event[] eventWaitList)
        {
            EventSafeHandle[] eventHandles = null;
            if (eventWaitList != null)
            {
                eventHandles = Array.ConvertAll(eventWaitList, @event => @event.Handle);
            }

            IntPtr          imageRowPitch;
            IntPtr          imageSlicePitch;
            EventSafeHandle handle = UnsafeNativeMethods.EnqueueMapImage(Handle, image.Handle, blocking, mapFlags, ref origin, ref region, out imageRowPitch, out imageSlicePitch, out mappedPointer, eventHandles);

            rowPitch   = imageRowPitch.ToInt64();
            slicePitch = imageSlicePitch.ToInt64();
            return(new Event(handle));
        }