From 750d98f1e6bc5d5461213eb441864865f2288f83 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 26 Feb 2011 14:10:30 +0100 Subject: Added a note about how to implement cOsd::Flush() for true color OSDs --- osd.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'osd.h') diff --git a/osd.h b/osd.h index 86a660c5..31abf10e 100644 --- a/osd.h +++ b/osd.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: osd.h 2.7 2011/02/26 12:13:59 kls Exp $ + * $Id: osd.h 2.8 2011/02/26 14:10:30 kls Exp $ */ #ifndef __OSD_H @@ -895,6 +895,17 @@ public: virtual void Flush(void); ///< Actually commits all data to the OSD hardware. ///< Flush() should return as soon as possible. + ///< For a true color OSD using the default implementation with in memory + ///< pixmaps, the Flush() function should basically do something like this: + ///< + ///< LOCK_PIXMAPS; + ///< while (cPixmapMemory *pm = RenderPixmaps()) { + ///< int w = pm->ViewPort().Width(); + ///< int h = pm->ViewPort().Height(); + ///< int d = w * sizeof(tColor); + ///< MyOsdDrawPixmap(Left() + pm->ViewPort().X(), Top() + pm->ViewPort().Y(), pm->Data(), w, h, h * d); + ///< delete pm; + ///< } }; #define MAXOSDIMAGES 64 -- cgit v1.2.3