diff options
Diffstat (limited to 'lib/gdi/accel.cpp')
| -rw-r--r-- | lib/gdi/accel.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/gdi/accel.cpp b/lib/gdi/accel.cpp index 5e489eb3..bd1439f2 100644 --- a/lib/gdi/accel.cpp +++ b/lib/gdi/accel.cpp @@ -32,7 +32,7 @@ extern void bcm_accel_blit( int dst_addr, int dst_width, int dst_height, int dst_stride, int src_x, int src_y, int width, int height, int dst_x, int dst_y, int dwidth, int dheight, - int pal_addr); + int pal_addr, int flags); extern void bcm_accel_fill( int dst_addr, int dst_width, int dst_height, int dst_stride, int x, int y, int width, int height, @@ -112,7 +112,7 @@ int gAccel::blit(gSurface *dst, const gSurface *src, const eRect &p, const eRect pal_addr = src->stride * src->y; unsigned long *pal = (unsigned long*)(((unsigned char*)src->data) + pal_addr); pal_addr += src->data_phys; - for (i = 0; i < 256; ++i) + for (i = 0; i < src->clut.colors; ++i) *pal++ = src->clut.data[i].argb() ^ 0xFF000000; } else return -1; /* unsupported source format */ @@ -122,7 +122,7 @@ int gAccel::blit(gSurface *dst, const gSurface *src, const eRect &p, const eRect dst->data_phys, dst->x, dst->y, dst->stride, area.left(), area.top(), area.width(), area.height(), p.x(), p.y(), p.width(), p.height(), - pal_addr); + pal_addr, flags); return 0; } #endif @@ -138,12 +138,14 @@ int gAccel::fill(gSurface *dst, const eRect &area, unsigned long col) col); return 0; #endif -#if 0 // def BCM_ACCEL - bcm_accel_fill( - dst->data_phys, dst->x, dst->y, dst->stride, - area.left(), area.top(), area.width(), area.height(), - col); - return 0; +#ifdef BCM_ACCEL + if (!m_bcm_accel_state) { + bcm_accel_fill( + dst->data_phys, dst->x, dst->y, dst->stride, + area.left(), area.top(), area.width(), area.height(), + col); + return 0; + } #endif return -1; } |
