summaryrefslogtreecommitdiff
path: root/render.c
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2004-12-12 19:53:30 +0000
committerlordjaxom <lordjaxom>2004-12-12 19:53:30 +0000
commit3b0999969632e2820b846ca8adcef6b346ff7441 (patch)
tree1582ed7db886839ea06c226e228eade0516f60c2 /render.c
parente4c359b5c303cecfc49fb82799805da9fee8dadb (diff)
downloadvdr-plugin-text2skin-3b0999969632e2820b846ca8adcef6b346ff7441.tar.gz
vdr-plugin-text2skin-3b0999969632e2820b846ca8adcef6b346ff7441.tar.bz2
1.0-pre3v1.0-pre3
Diffstat (limited to 'render.c')
-rw-r--r--render.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/render.c b/render.c
index dfbc0ba..502a3ca 100644
--- a/render.c
+++ b/render.c
@@ -1,5 +1,5 @@
/*
- * $Id: render.c,v 1.6 2004/12/08 18:47:37 lordjaxom Exp $
+ * $Id: render.c,v 1.7 2004/12/10 21:46:46 lordjaxom Exp $
*/
#include "render.h"
@@ -28,7 +28,9 @@ cText2SkinRender::cText2SkinRender(cText2SkinLoader *Loader, cxDisplay::eType Di
mDirty(true),
mActive(false),
mDoUpdate(),
- mMutex(),
+ mDoUpdateMutex(),
+ //mDoneUpdate(),
+ //mDoneUpdateMutex(),
mStarted(),
mUpdateIn(0),
mBaseSize()
@@ -87,10 +89,10 @@ cText2SkinRender::cText2SkinRender(cText2SkinLoader *Loader, cxDisplay::eType Di
}
if (!OffScreen) {
- Lock();
+ mDoUpdateMutex.Lock();
Start();
- mStarted.Wait(mMutex);
- Unlock();
+ mStarted.Wait(mDoUpdateMutex);
+ mDoUpdateMutex.Unlock();
}
}
@@ -108,18 +110,22 @@ cText2SkinRender::~cText2SkinRender() {
void cText2SkinRender::Action(void) {
mActive = true;
- Lock();
+ mDoUpdateMutex.Lock();
mStarted.Broadcast();
while (mActive) {
- if (mUpdateIn) mDoUpdate.TimedWait(mMutex, mUpdateIn);
- else mDoUpdate.Wait(mMutex);
+ if (mUpdateIn) mDoUpdate.TimedWait(mDoUpdateMutex, mUpdateIn);
+ else mDoUpdate.Wait(mDoUpdateMutex);
- if (!mActive) break; // fall out if thread to be stopped
+ if (!mActive) break; // fall out if thread to be stopped
mUpdateIn = 0; // has to be re-set within Update();
Update();
+
+ //mDoneUpdateMutex.Lock();
+ //mDoneUpdate.Broadcast();
+ //mDoneUpdateMutex.Unlock();
}
- Unlock();
+ mDoUpdateMutex.Unlock();
}
void cText2SkinRender::Update(void) {
@@ -243,7 +249,7 @@ void cText2SkinRender::DrawImage(const txPoint &Pos, const tColor *Bg, const tCo
const std::string &Path)
{
cText2SkinBitmap *bmp;
- //Dprintf("trying to draw image %s to %dx%d\n", ImagePath(Path).c_str(), Pos.x, Pos.y);
+ Dprintf("trying to draw image %s to %dx%d - alpha %d\n", ImagePath(Path).c_str(), Pos.x, Pos.y, Alpha);
if ((bmp = cText2SkinBitmap::Load(ImagePath(Path), Alpha)) != NULL) {
//Dprintf("success loading image\n");
if (Bg) bmp->SetColor(0, *Bg);