summaryrefslogtreecommitdiff
path: root/osd.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2015-02-11 09:48:02 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2015-02-11 09:48:02 +0100
commit22106f6dd33097905c4d76f78a84661bd2c805d0 (patch)
treeafe3200e22f96eb4275ec43dfc2957c4d5621785 /osd.h
parent89f5244007965c047ddf7943daf285cb3832b733 (diff)
downloadvdr-22106f6dd33097905c4d76f78a84661bd2c805d0.tar.gz
vdr-22106f6dd33097905c4d76f78a84661bd2c805d0.tar.bz2
cOsd::RenderPixmaps() now returns a pointer to cPixmap instead of cPixmapMemory; a cPixmap with a negative layer no longer marks any portion of the OSD's view port as "dirty"; Added a missing initialization of "panning" to the constructor of cPixmapMemory
Diffstat (limited to 'osd.h')
-rw-r--r--osd.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/osd.h b/osd.h
index e5864c4f..9ef32ac7 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 3.5 2015/01/15 11:23:52 kls Exp $
+ * $Id: osd.h 3.6 2015/02/11 09:48:02 kls Exp $
*/
#ifndef __OSD_H
@@ -763,12 +763,13 @@ protected:
///< the pixmap could not be added to the list.
///< A derived class that implements its own cPixmap class must call AddPixmap()
///< in order to add a newly created pixmap to the OSD's list of pixmaps.
- cPixmapMemory *RenderPixmaps(void);
+ cPixmap *RenderPixmaps(void);
///< Renders the dirty part of all pixmaps into a resulting pixmap that
///< shall be displayed on the OSD. The returned pixmap's view port is
///< set to the location of the rectangle on the OSD that needs to be
///< refreshed; its draw port's origin is at (0, 0), and it has the same
///< size as the view port.
+ ///< Only pixmaps with a non-negative layer value are rendered.
///< If there are several non-overlapping dirty rectangles from different pixmaps,
///< they are returned separately in order to avoid re-rendering large parts
///< of the OSD that haven't changed at all. The caller must therefore call
@@ -778,7 +779,7 @@ protected:
///< by putting a LOCK_PIXMAPS into the scope of the operation).
///< If there are no dirty pixmaps, or if this is not a true color OSD,
///< this function returns NULL.
- ///< The caller must delete the returned pixmap after use.
+ ///< The caller must call DestroyPixmap() for the returned pixmap after use.
public:
virtual ~cOsd();
///< Shuts down the OSD.
@@ -930,13 +931,16 @@ public:
///< pixmaps, the Flush() function should basically do something like this:
///<
///< LOCK_PIXMAPS;
- ///< while (cPixmapMemory *pm = RenderPixmaps()) {
+ ///< while (cPixmapMemory *pm = dynamic_cast<cPixmapMemory *>(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;
+ ///< DestroyPixmap(pm);
///< }
+ ///<
+ ///< If a plugin uses a derived cPixmap implementation, it needs to use that
+ ///< type instead of cPixmapMemory.
};
#define MAXOSDIMAGES 64