git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "lib/gdi/font.cpp: call libfribidi for single lines on multi line texts to...
[enigma2.git]
/
lib
/
gdi
/
gpixmap.cpp
diff --git
a/lib/gdi/gpixmap.cpp
b/lib/gdi/gpixmap.cpp
index 6f741d8563f2f606b1b74efe786423f8dd6c9748..3e64310865ff2683340ff0584607ef9caa8a0ddd 100644
(file)
--- a/
lib/gdi/gpixmap.cpp
+++ b/
lib/gdi/gpixmap.cpp
@@
-98,8
+98,12
@@
gSurface::gSurface(eSize size, int _bpp, int accel)
stride += 63;
stride &=~63;
stride += 63;
stride &=~63;
+ int pal_size = 0;
+ if (bpp == 8)
+ pal_size = 256 * 4;
+
if (gAccel::getInstance())
if (gAccel::getInstance())
- eDebug("accel memory: %d", gAccel::getInstance()->accelAlloc(data, data_phys, y * stride));
+ eDebug("accel memory: %d", gAccel::getInstance()->accelAlloc(data, data_phys, y * stride
+ pal_size
));
else
eDebug("no accel available");
}
else
eDebug("no accel available");
}
@@
-143,7
+147,7
@@
void gPixmap::fill(const gRegion ®ion, const gColor &color)
for (i=0; i<region.rects.size(); ++i)
{
const eRect &area = region.rects[i];
for (i=0; i<region.rects.size(); ++i)
{
const eRect &area = region.rects[i];
- if (
(area.height()<=0) || (area.width()<=0
))
+ if (
area.empty(
))
continue;
if (surface->bpp == 8)
continue;
if (surface->bpp == 8)
@@
-159,8
+163,8
@@
void gPixmap::fill(const gRegion ®ion, const gColor &color)
else
col=0x10101*color;
else
col=0x10101*color;
- col^=0xFF000000;
-
+ col^=0xFF000000;
+
if (surface->data_phys && gAccel::getInstance())
if (!gAccel::getInstance()->fill(surface, area, col))
continue;
if (surface->data_phys && gAccel::getInstance())
if (!gAccel::getInstance()->fill(surface, area, col))
continue;
@@
-183,7
+187,7
@@
void gPixmap::fill(const gRegion ®ion, const gRGB &color)
for (i=0; i<region.rects.size(); ++i)
{
const eRect &area = region.rects[i];
for (i=0; i<region.rects.size(); ++i)
{
const eRect &area = region.rects[i];
- if (
(area.height()<=0) || (area.width()<=0
))
+ if (
area.empty(
))
continue;
if (surface->bpp == 32)
continue;
if (surface->bpp == 32)
@@
-292,7
+296,7
@@
void gPixmap::blit(const gPixmap &src, const eRect &_pos, const gRegion &clip, i
area&=clip.rects[i];
area&=eRect(ePoint(0, 0), size());
area&=clip.rects[i];
area&=eRect(ePoint(0, 0), size());
- if (
(area.width()<0) || (area.height()<0
))
+ if (
area.empty(
))
continue;
eRect srcarea = area;
continue;
eRect srcarea = area;