X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fgdi%2Faccel.cpp;h=bd1439f296d1ca1ff72339cce024e74cf4855070;hb=b72e934d80c1d57d18b3e9d69470604b3180cee5;hp=5e489eb338d04f8fdc4c6644ce52c12d5fc3f5ae;hpb=1f3e4e59174d695fd9cfe2fb16caf883e8e9477f;p=vuplus_dvbapp diff --git a/lib/gdi/accel.cpp b/lib/gdi/accel.cpp index 5e489eb..bd1439f 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; }