gbm: CursorBackend depends on backend_drm_legacy

This commit is contained in:
Victor Brekenfeld 2018-11-22 11:40:56 +01:00
parent 59e0ad87f9
commit d07c66985f
1 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,7 @@ use std::cell::{Cell, RefCell};
use std::os::unix::io::AsRawFd; use std::os::unix::io::AsRawFd;
use std::rc::Rc; use std::rc::Rc;
#[cfg(feature = "backend_drm_legacy")]
use backend::drm::legacy::LegacyDrmDevice; use backend::drm::legacy::LegacyDrmDevice;
use backend::graphics::CursorBackend; use backend::graphics::CursorBackend;
use backend::graphics::SwapBuffersError; use backend::graphics::SwapBuffersError;
@ -225,6 +226,7 @@ where
*/ */
// But for now got to do this: // But for now got to do this:
#[cfg(feature = "backend_drm_legacy")]
impl<'a, A: AsRawFd + 'static> CursorBackend<'a> for GbmSurfaceInternal<LegacyDrmDevice<A>> { impl<'a, A: AsRawFd + 'static> CursorBackend<'a> for GbmSurfaceInternal<LegacyDrmDevice<A>> {
type CursorFormat = &'a ImageBuffer<Rgba<u8>, Vec<u8>>; type CursorFormat = &'a ImageBuffer<Rgba<u8>, Vec<u8>>;
type Error = Error; type Error = Error;
@ -353,6 +355,7 @@ impl<D: RawDevice + 'static> Surface for GbmSurface<D> {
} }
} }
#[cfg(feature = "backend_drm_legacy")]
impl<'a, A: AsRawFd + 'static> CursorBackend<'a> for GbmSurface<LegacyDrmDevice<A>> { impl<'a, A: AsRawFd + 'static> CursorBackend<'a> for GbmSurface<LegacyDrmDevice<A>> {
type CursorFormat = &'a ImageBuffer<Rgba<u8>, Vec<u8>>; type CursorFormat = &'a ImageBuffer<Rgba<u8>, Vec<u8>>;
type Error = Error; type Error = Error;