remove unneeded LCD_DEPTH test in lib/resize.h, add some comments explaining the core-file imports

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19715 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andrew Mahone 2009-01-08 08:32:05 +00:00
parent c7e83bd017
commit 32d9752dcc
4 changed files with 14 additions and 5 deletions

View file

@ -4,6 +4,10 @@ fixedpoint.c
playback_control.c playback_control.c
rgb_hsv.c rgb_hsv.c
#if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4)
/*
The scaler is not provided in core on mono targets, but is built in
pluginlib for use with greylib overlay output
*/
#if LCD_DEPTH == 1 #if LCD_DEPTH == 1
resize.c resize.c
#endif #endif

View file

@ -27,7 +27,7 @@
#include "lcd.h" #include "lcd.h"
#include "system.h" #include "system.h"
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1 /* save is only available for color, resize for >1bpp */
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
#define LE16(x) (htole16(x))&0xff, ((htole16(x))>>8)&0xff #define LE16(x) (htole16(x))&0xff, ((htole16(x))>>8)&0xff
#define LE32(x) (htole32(x))&0xff, ((htole32(x))>>8)&0xff, ((htole32(x))>>16)&0xff, ((htole32(x))>>24)&0xff #define LE32(x) (htole32(x))&0xff, ((htole32(x))>>8)&0xff, ((htole32(x))>>16)&0xff, ((htole32(x))>>24)&0xff
@ -122,13 +122,15 @@ void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst)
} }
} }
#else #else /* LCD_DEPTH == 1 */
#include "wrappers.h" #include "wrappers.h"
static const struct plugin_api *rb; static const struct plugin_api *rb;
/* import the core bmp loader */
#include "../../recorder/bmp.c" #include "../../recorder/bmp.c"
/* initialize rb for use by the bmp loader */
void bmp_init(const struct plugin_api *api) void bmp_init(const struct plugin_api *api)
{ {
rb = api; rb = api;

View file

@ -24,7 +24,7 @@
#include "lcd.h" #include "lcd.h"
#include "plugin.h" #include "plugin.h"
#if LCD_DEPTH > 1 #if LCD_DEPTH > 1 /* save is only available for color, resize for >1bpp */
#ifdef HAVE_LCD_COLOR #ifdef HAVE_LCD_COLOR
/** /**
* Save bitmap to file * Save bitmap to file
@ -45,6 +45,11 @@ void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst);
void smooth_resize_bitmap(struct bitmap *src, struct bitmap *dst); void smooth_resize_bitmap(struct bitmap *src, struct bitmap *dst);
#else #else
/*
BMP loader is built with scaling support in pluginlib on 1bpp targets, as
these do not provide scaling support in the core BMP loader. bmp_init is
needed to copy the plugin API pointer for the pluginlib loader's use.
*/
void bmp_init(const struct plugin_api *api); void bmp_init(const struct plugin_api *api);
#endif #endif

View file

@ -24,8 +24,6 @@
#ifndef _LIB_RESIZE_H_ #ifndef _LIB_RESIZE_H_
#define _LIB_RESIZE_H_ #define _LIB_RESIZE_H_
#if LCD_DEPTH == 1
void resize_init(const struct plugin_api *api); void resize_init(const struct plugin_api *api);
#endif
#endif #endif