Example #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (surfaceHandle != null)
     {
         gbm_surface_destroy(surfaceHandle);
     }
     surfaceHandle = null;
 }
Example #2
0
        public Surface(Device gbmDev, uint width, uint height, SurfaceFormat format, ulong modifier)
        {
            this.Device        = gbmDev;
            this.surfaceHandle = gbm_surface_create_with_modifiers(gbmDev.Handle, width, height, format, &modifier, 1);

            if (this.surfaceHandle == null)
            {
                throw new NotSupportedException("[GBM] Failed to create GBM surface");
            }
        }
Example #3
0
        public Surface(Device gbmDev, uint width, uint height, SurfaceFormat format, SurfaceFlags flags)
        {
            this.Device        = gbmDev;
            this.surfaceHandle = gbm_surface_create(gbmDev.Handle, width, height, format, flags);

            if (this.surfaceHandle == null)
            {
                throw new NotSupportedException("[GBM] Failed to create GBM surface");
            }
        }
Example #4
0
 static extern bool gbm_surface_has_free_buffers(gbm_surface *surface);
Example #5
0
 static extern void gbm_surface_release_buffer(gbm_surface *surface, gbm_bo *bo);
Example #6
0
 static extern gbm_bo *gbm_surface_lock_front_buffer(gbm_surface *surface);
Example #7
0
 internal static extern void gbm_surface_destroy(gbm_surface *surface);