pub fn clear_plane(&self, plane: plane::Handle) -> Result<(), Error> {
        let mut req = AtomicModeReq::new();

        req.add_property(
            self.plane,
            self.plane_prop_handle(self.plane, "CRTC_ID")?,
            property::Value::CRTC(None),
        );

        req.add_property(
            self.plane,
            self.plane_prop_handle(self.plane, "FB_ID")?,
            property::Value::Framebuffer(None),
        );

        let result = self
            .fd
            .atomic_commit(&[AtomicCommitFlags::Nonblock], req)
            .map_err(|source| Error::Access {
                errmsg: "Failed to commit on clear_plane",
                dev: self.fd.dev_path(),
                source,
            });

        if result.is_ok() {
            self.additional_planes
                .lock()
                .unwrap()
                .retain(|info| info.handle != plane);
        }

        result
    }
// this helper function disconnects the plane.
// this is mostly used to remove the contents quickly, e.g. on tty switch,
// as other compositors might not make use of other planes,
// leaving our e.g. cursor or overlays as a relict of a better time on the screen.
this helper function disconnects the plane.
this is mostly used to remove the contents quickly, e.g. on tty switch,
as other compositors might not make use of other planes,
leaving our e.g. cursor or overlays as a relict of a better time on the screen.
this helper function disconnects the plane . this is mostly used to remove the contents quickly e . g . on tty switch as other compositors might not make use of other planes leaving our e . g . cursor or overlays as a relict of a better time on the screen .
pub fn clear_plane(&self, plane: plane::Handle) -> Result<(), Error> {
        let mut req = AtomicModeReq::new();
        req.add_property(
            self.plane,
            self.plane_prop_handle(self.plane, "CRTC_ID")?,
            property::Value::CRTC(None),
        );
        req.add_property(
            self.plane,
            self.plane_prop_handle(self.plane, "FB_ID")?,
            property::Value::Framebuffer(None),
        );
        let result = self
            .fd
            .atomic_commit(&[AtomicCommitFlags::Nonblock], req)
            .map_err(|source| Error::Access {
                errmsg: "Failed to commit on clear_plane",
                dev: self.fd.dev_path(),
                source,
            });
        if result.is_ok() {
            self.additional_planes
                .lock()
                .unwrap()
                .retain(|info| info.handle != plane);
        }
        result
    }
pub fn clear_plane ( & self , plane : plane :: Handle ) -> Result < ( ) , Error > { let mut req = AtomicModeReq :: new ( ) ; req . add_property ( self . plane , self . plane_prop_handle ( self . plane , " " ) ? , property :: Value :: CRTC ( None ) , ) ; req . add_property ( self . plane , self . plane_prop_handle ( self . plane , " " ) ? , property :: Value :: Framebuffer ( None ) , ) ; let result = self . fd . atomic_commit ( & [ AtomicCommitFlags :: Nonblock ] , req ) . map_err ( | source | Error :: Access { errmsg : " " , dev : self . fd . dev_path ( ) , source , } ) ; if result . is_ok ( ) { self . additional_planes . lock ( ) . unwrap ( ) . retain ( | info | info . handle != plane ) ; } result }
this helper function disconnects the plane.
this helper function disconnects the plane .
&self
plane
plane::Handle
&self
plane
plane::Handle