1
0
Fork 0
forked from len0rd/rockbox

lcd drivers: Convert lcd_[remote_]framebuffer to a pointer

Change all lcd drivers to using a pointer to the static framebuffer
instead of directly accessing the static array. This will let us
later do fun things like dynamic framebuffer sizes (RaaA) or
ability to use different buffers for different layers (dynamic
skin backdrops!)

Change-Id: I0a4d58a9d7b55e6c932131b929e5d4c9f9414b06
This commit is contained in:
Jonathan Gordon 2012-02-22 21:18:05 +11:00
parent 15c69b8baf
commit b37e6bc8c1
65 changed files with 193 additions and 181 deletions

View file

@ -75,7 +75,7 @@ void connect_with_java(JNIEnv* env, jobject fb_instance)
/* Create native_buffer */
jobject buffer = (*env)->NewDirectByteBuffer(env, lcd_framebuffer,
(jlong) sizeof(lcd_framebuffer));
(jlong) FRAMEBUFFER_SIZE);
/* we need to setup parts for the java object every time */
(*env)->CallVoidMethod(env, fb_instance, java_lcd_init,
@ -206,10 +206,10 @@ void lcd_blit_yuv(unsigned char * const src[3],
linecounter = height >> 1;
#if LCD_WIDTH >= LCD_HEIGHT
dst = &lcd_framebuffer[y][x];
dst = FBADDR(x,y);
row_end = dst + width;
#else
dst = &lcd_framebuffer[x][LCD_WIDTH - y - 1];
dst = FBADDR(LCD_WIDTH - y - 1,x);
row_end = dst + LCD_WIDTH * width;
#endif