+// creates a dummy surface that has the same format as the real window's
+// surface, but is not visible and so can be painted on even if the window
+// is hidden
+static
+wxIDirectFBSurfacePtr CreateDummySurface(wxWindow *win, const wxRect *rect)
+{
+ wxLogTrace(TRACE_PAINT, "%p ('%s'): creating dummy DC surface",
+ win, win->GetName().c_str());
+ wxSize size(rect ? rect->GetSize() : win->GetSize());
+
+ // we can't create a surface of 0 size but the size of the window may be 0,
+ // so ensure that we have at least a single pixel to draw on
+ size.IncTo(wxSize(1, 1));
+
+ return win->GetDfbSurface()->CreateCompatible
+ (
+ size,
+ wxIDirectFBSurface::CreateCompatible_NoBackBuffer
+ );
+}
+
+//-----------------------------------------------------------------------------
+// wxWindowDCImpl
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_ABSTRACT_CLASS(wxWindowDCImpl, wxDFBDCImpl)
+
+wxWindowDCImpl::wxWindowDCImpl(wxDC *owner, wxWindow *win)
+ : wxDFBDCImpl(owner)