summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2009-10-08 11:28:40 +0200
committerChristian Gmeiner <christian.gmeiner@gmail.com>2009-10-08 11:28:40 +0200
commita8240bb6b214fc844acaec5c0955255f2a5048a0 (patch)
tree438469a2a870eadb9bd1652f3f080ee4375a5a2a
parent34dffe437703ebf2d194a3221bb45cc18760627f (diff)
downloadvdr-plugin-dxr3-a8240bb6b214fc844acaec5c0955255f2a5048a0.tar.gz
vdr-plugin-dxr3-a8240bb6b214fc844acaec5c0955255f2a5048a0.tar.bz2
change the way we use to encode the osd in cDxr3Osd::Flush
-rw-r--r--dxr3osd.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/dxr3osd.c b/dxr3osd.c
index 288f62a..6ece3c9 100644
--- a/dxr3osd.c
+++ b/dxr3osd.c
@@ -151,20 +151,32 @@ void cDxr3Osd::Flush()
if (!Active())
return;
- int i = 0;
- while (GetBitmap(i) != NULL) {
+ cBitmap *bmap = NULL;
+ int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
- int x1 = 0, y1 = 0, x2 = 0, y2 = 0;
+ // check if we need to encode an OSD, which is build by only
+ // one area, or if we need to create a big bitmap containing
+ // all areas
+ if (numAreas == 1) {
- if (GetBitmap(0)->Dirty(x1, y1, x2, y2)) {
+ // we only need to set bmap pointer to a valid bitmap
+ bmap = GetBitmap(0);
- cSpuEncoder::instance()->encode(GetBitmap(i), Top(), Left());
- shown = true;
- GetBitmap(i)->Clean();
- }
- i++;
+ } else {
+
+ /* TODO */
}
+ if (!bmap)
+ return;
+
+ // encode bitmap
+ if (bmap->Dirty(x1, y1, x2, y2)) {
+ cSpuEncoder::instance()->encode(bmap, Top(), Left());
+ shown = true;
+ bmap->Clean();
+ }
+
#if 0
if (last->Elapsed() < cDxr3ConfigData::instance()->GetOsdFlushRate())
return;