diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2011-02-26 14:10:30 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2011-02-26 14:10:30 +0100 |
commit | 750d98f1e6bc5d5461213eb441864865f2288f83 (patch) | |
tree | 7c8c2178ec7bd441f22cf9b97c12bba0be9350f5 /osd.h | |
parent | 0b8356aa927db1d536c00211a7d77fd2168d70dc (diff) | |
download | vdr-750d98f1e6bc5d5461213eb441864865f2288f83.tar.gz vdr-750d98f1e6bc5d5461213eb441864865f2288f83.tar.bz2 |
Added a note about how to implement cOsd::Flush() for true color OSDs
Diffstat (limited to 'osd.h')
-rw-r--r-- | osd.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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 |