X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d2df97f6c86982383f1fb4beb45d66ab1e41879..94e0018723919fe2ca2f5b5f0a42804c16dbf3a1:/src/dfb/dcscreen.cpp?ds=sidebyside diff --git a/src/dfb/dcscreen.cpp b/src/dfb/dcscreen.cpp index 730903e87f..db19dc53a1 100644 --- a/src/dfb/dcscreen.cpp +++ b/src/dfb/dcscreen.cpp @@ -31,8 +31,33 @@ // wxScreenDC //----------------------------------------------------------------------------- -#warning "FIXME: this doesn't work (neither single app nor multiapp core) -// FIXME: maybe use a subsurface as well? +// FIXME: Currently, wxScreenDC doesn't work at all in non-exclusive mode +// (DFSCL_NORMAL). In this mode, requesting primary surface results +// in one of the following actions, depending on directfbrc +// configuration: +// +// (1) if force-desktop, a surface is created and used as *background* +// for the windows managed by DFB WM +// +// (2) otherwise, a dummy surface of the right size and format is +// created, but isn't shown on the screen +// +// (3) furthermore, if autoflip-window option is not used and primary +// surface is requested as single-buffered (which is needed to +// implement wxScreenDC semantics), a warning is issued in addition +// to 2); if autoflip-window is used, then a helper thread is +// created and does periodic flipping, which is even worse +// +// 2) and 3) are obviously unsatisfactory. 1) isn't suitable either, +// because wxScreenDC has to render *on top* of windows. +// +// In conclusion, wxScreenDC as currently implemented is only usable +// for measuring things (e.g. font sizes). For this task, however, it +// is quite expensive to create in DFSCL_NORMAL mode, because it +// involves creation of a new surface as big as the screen. +// +// The surface, as obtained from GetPrimarySurface(), is double-buffered +// for the sole purpose of silencing the warning from 3) above. IMPLEMENT_ABSTRACT_CLASS(wxScreenDCImpl, wxDFBDCImpl) @@ -41,5 +66,3 @@ wxScreenDCImpl::wxScreenDCImpl(wxScreenDC *owner) { DFBInit(wxIDirectFB::Get()->GetPrimarySurface()); } - -#warning "FIXME: does wxScreenDC need Flip call in dtor?"