From d60586fded4b915dfd974f55bd843b64ce452140 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Mon, 19 Mar 2012 19:51:48 +0100 Subject: [PATCH] dvbsub: use the FB backbuffer on spark Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/40532a9d67e4303ead9617b593c99037becf40c7 Author: Stefan Seyfried Date: 2012-03-19 (Mon, 19 Mar 2012) --- lib/libdvbsub/dvbsubtitle.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/libdvbsub/dvbsubtitle.cpp b/lib/libdvbsub/dvbsubtitle.cpp index a03a0498e..151594e6e 100644 --- a/lib/libdvbsub/dvbsubtitle.cpp +++ b/lib/libdvbsub/dvbsubtitle.cpp @@ -77,12 +77,16 @@ fb_pixel_t * simple_resize32(uint8_t * orgin, uint32_t * colors, int nb_colors, fb_pixel_t *cr,*l; int i,j,k,ip; +#ifndef HAVE_SPARK_HARDWARE cr = (fb_pixel_t *) malloc(dx*dy*sizeof(fb_pixel_t)); if(cr == NULL) { printf("Error: malloc\n"); return NULL; } +#else + cr = CFrameBuffer::getInstance()->getBackBufferPointer(); +#endif l = cr; for(j = 0; j < dy; j++, l += dx) @@ -160,8 +164,8 @@ void cDvbSubtitleBitmaps::Draw(int &min_x, int &min_y, int &max_x, int &max_y) for (int x2 = 0; x2 < nw; x2++) *(sublfb + xoff + x2 + y) = *ptr++; } -#endif free(newdata); +#endif if(min_x > xoff) min_x = xoff;