protected virtual void Dispose(bool disposing) { if (surfaceHandle != null) { gbm_surface_destroy(surfaceHandle); } surfaceHandle = null; }
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"); } }
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"); } }
static extern bool gbm_surface_has_free_buffers(gbm_surface *surface);
static extern void gbm_surface_release_buffer(gbm_surface *surface, gbm_bo *bo);
static extern gbm_bo *gbm_surface_lock_front_buffer(gbm_surface *surface);
internal static extern void gbm_surface_destroy(gbm_surface *surface);