+
+bool wxIDirectFBSurface::Flip(const DFBRegion *region, int flags)
+{
+ return Check(m_ptr->Flip(m_ptr, region, (DFBSurfaceFlipFlags)flags));
+}
+
+bool wxIDirectFBSurface::FlipToFront(const DFBRegion *region)
+{
+ // Blit to the front buffer instead of exchanging front and back ones.
+ // Always doing this ensures that back and front buffer have same content
+ // and so painting to the back buffer will never lose any previous
+ // drawings:
+ return Flip(region, DSFLIP_BLIT);
+}
+
+//-----------------------------------------------------------------------------
+// wxIDirectFBDisplayLayer
+//-----------------------------------------------------------------------------
+
+wxVideoMode wxIDirectFBDisplayLayer::GetVideoMode()
+{
+ DFBDisplayLayerConfig cfg;
+ if ( !GetConfiguration(&cfg) )
+ return wxVideoMode(); // invalid
+
+ if ( !((cfg.flags & DLCONF_WIDTH) &&
+ (cfg.flags & DLCONF_HEIGHT) &&
+ (cfg.flags & DLCONF_PIXELFORMAT)) )
+ return wxVideoMode(); // invalid
+
+ return wxVideoMode
+ (
+ cfg.width,
+ cfg.height,
+ DFB_BITS_PER_PIXEL(cfg.pixelformat)
+ );
+}