git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix alphatest (HACK!!!)
[enigma2.git]
/
lib
/
gdi
/
grc.cpp
diff --git
a/lib/gdi/grc.cpp
b/lib/gdi/grc.cpp
index 05aaa6ffed8330a4bf117423719afa26a4fdc255..f54f1604ca1d5b352f8ebe05c2abd208737bcda4 100644
(file)
--- a/
lib/gdi/grc.cpp
+++ b/
lib/gdi/grc.cpp
@@
-1,5
+1,5
@@
// for debugging use:
// for debugging use:
-#define SYNC_PAINT
+
#define SYNC_PAINT
#include <unistd.h>
#ifndef SYNC_PAINT
#include <pthread.h>
#include <unistd.h>
#ifndef SYNC_PAINT
#include <pthread.h>
@@
-55,6
+55,7
@@
gRC::~gRC()
void *gRC::thread()
{
void *gRC::thread()
{
+ int need_notify = 0;
#ifndef SYNC_PAINT
while (1)
#else
#ifndef SYNC_PAINT
while (1)
#else
@@
-66,12
+67,17
@@
void *gRC::thread()
if (o.opcode==gOpcode::shutdown)
break;
if (o.opcode==gOpcode::notify)
if (o.opcode==gOpcode::shutdown)
break;
if (o.opcode==gOpcode::notify)
- {
- m_notify_pump.send(1);
- } else
+ need_notify = 1;
+ else
o.dc->exec(&o);
o.dc->Release();
queue.dequeue();
o.dc->exec(&o);
o.dc->Release();
queue.dequeue();
+
+ if ((!queue.size()) && need_notify)
+ {
+ need_notify = 0;
+ m_notify_pump.send(1);
+ }
}
#ifndef SYNC_PAINT
pthread_exit(0);
}
#ifndef SYNC_PAINT
pthread_exit(0);
@@
-221,6
+227,8
@@
void gPainter::blit(gPixmap *pixmap, ePoint pos, const eRect &clip, int flags)
{
gOpcode o;
{
gOpcode o;
+ ASSERT(pixmap);
+
o.opcode=gOpcode::blit;
o.dc = m_dc.grabRef();
pixmap->AddRef();
o.opcode=gOpcode::blit;
o.dc = m_dc.grabRef();
pixmap->AddRef();
@@
-436,7
+444,9
@@
void gDC::exec(gOpcode *o)
if (o->parm.renderText->flags & gPainter::RT_VALIGN_CENTER)
{
eRect bbox = para->getBoundBox();
if (o->parm.renderText->flags & gPainter::RT_VALIGN_CENTER)
{
eRect bbox = para->getBoundBox();
- offset += ePoint(0, (o->parm.renderText->area.height() - bbox.height()) / 2);
+ int vcentered_top = (o->parm.renderText->area.height() - bbox.height()) / 2;
+ int correction = vcentered_top - bbox.top();
+ offset += ePoint(0, correction);
}
para->blit(*this, offset, getRGB(m_background_color), getRGB(m_foreground_color));
delete o->parm.renderText;
}
para->blit(*this, offset, getRGB(m_background_color), getRGB(m_foreground_color));
delete o->parm.renderText;