forked from enlightenment/efl
cleanup: internal image information is now unsigned.
There is no meaning in negative values for image loading, marking as dirty or size, so image internals (cache, entry) were changed to unsigned, reducing possible errors, particularly with overflow. engines were converted to the new way, but any 3rd party modules will still work as they should be using values >= 0 only anyway. please review. new cases introduced by "comparison between signed and unsigned" were fixed in the modules that used cache_entry or Image_Entry dimensions. SVN revision: 52428
This commit is contained in:
parent
5dd0eeb7ab
commit
d89ebf341b
|
@ -14,7 +14,7 @@ struct _Evas_Cache_Image_Func
|
|||
void (*dealloc)(Image_Entry *im);
|
||||
|
||||
/* The cache provide some helpers for surface manipulation. */
|
||||
int (*surface_alloc)(Image_Entry *im, int w, int h);
|
||||
int (*surface_alloc)(Image_Entry *im, unsigned int w, unsigned int h);
|
||||
void (*surface_delete)(Image_Entry *im);
|
||||
DATA32 *(*surface_pixels)(Image_Entry *im);
|
||||
|
||||
|
@ -22,18 +22,18 @@ struct _Evas_Cache_Image_Func
|
|||
int (*constructor)(Image_Entry *im); /**< return is EVAS_LOAD_ERROR_* or EVAS_LOAD_ERROR_NONE! */
|
||||
void (*destructor)(Image_Entry *im);
|
||||
|
||||
void (*dirty_region)(Image_Entry *im, int x, int y, int w, int h);
|
||||
void (*dirty_region)(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
/* Only called when references > 0. Need to provide a fresh copie of im. */
|
||||
/* The destination surface does have a surface, but no allocated pixel data. */
|
||||
int (*dirty)(Image_Entry *dst, const Image_Entry *src);
|
||||
/* Only called when references == 1. We will call drop on `im'. */
|
||||
/* The destination surface does not have any surface. */
|
||||
int (*size_set)(Image_Entry *dst, const Image_Entry *src, int w, int h);
|
||||
int (*size_set)(Image_Entry *dst, const Image_Entry *src, unsigned int w, unsigned int h);
|
||||
|
||||
/* The destination surface does not have any surface. */
|
||||
int (*copied_data)(Image_Entry *dst, int w, int h, DATA32 *image_data, int alpha, int cspace);
|
||||
int (*copied_data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
|
||||
/* The destination surface does not have any surface. */
|
||||
int (*data)(Image_Entry *dst, int w, int h, DATA32 *image_data, int alpha, int cspace);
|
||||
int (*data)(Image_Entry *dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
|
||||
int (*color_space)(Image_Entry *dst, int cspace);
|
||||
|
||||
/* This function need to update im->w and im->h. */
|
||||
|
@ -58,7 +58,7 @@ struct _Evas_Cache_Image
|
|||
void *data;
|
||||
|
||||
int usage;
|
||||
int limit;
|
||||
unsigned limit;
|
||||
int references;
|
||||
#ifdef EVAS_FRAME_QUEUING
|
||||
LK(lock);
|
||||
|
@ -76,7 +76,7 @@ struct _Evas_Cache_Engine_Image_Func
|
|||
int (*constructor)(Engine_Image_Entry *eim, void* data);
|
||||
void (*destructor)(Engine_Image_Entry *eim);
|
||||
|
||||
void (*dirty_region)(Engine_Image_Entry *eim, int x, int y, int w, int h);
|
||||
void (*dirty_region)(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
/* Only called when references > 0. Need to provide a fresh copie of im. */
|
||||
int (*dirty)(Engine_Image_Entry *dst, const Engine_Image_Entry *src);
|
||||
/* Only called when references == 1. We will call drop on `im'. */
|
||||
|
@ -126,21 +126,21 @@ EAPI void* evas_cache_private_from_image_entry_get(Image_Entr
|
|||
|
||||
EAPI int evas_cache_image_usage_get(Evas_Cache_Image *cache);
|
||||
EAPI int evas_cache_image_get(Evas_Cache_Image *cache);
|
||||
EAPI void evas_cache_image_set(Evas_Cache_Image *cache, int size);
|
||||
EAPI void evas_cache_image_set(Evas_Cache_Image *cache, unsigned int size);
|
||||
|
||||
EAPI Image_Entry* evas_cache_image_alone(Image_Entry *im);
|
||||
EAPI Image_Entry* evas_cache_image_dirty(Image_Entry *im, int x, int y, int w, int h);
|
||||
EAPI Image_Entry* evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
EAPI void evas_cache_image_load_data(Image_Entry *im);
|
||||
EAPI void evas_cache_image_unload_data(Image_Entry *im);
|
||||
EAPI Eina_Bool evas_cache_image_is_loaded(Image_Entry *im);
|
||||
EAPI void evas_cache_image_unload_all(Evas_Cache_Image *cache);
|
||||
EAPI void evas_cache_image_surface_alloc(Image_Entry *im, int w, int h);
|
||||
EAPI void evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h);
|
||||
EAPI DATA32* evas_cache_image_pixels(Image_Entry *im);
|
||||
EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace);
|
||||
EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace);
|
||||
EAPI Image_Entry* evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
|
||||
EAPI Image_Entry* evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
|
||||
EAPI void evas_cache_image_colorspace(Image_Entry *im, int cspace);
|
||||
EAPI Image_Entry* evas_cache_image_empty(Evas_Cache_Image *cache);
|
||||
EAPI Image_Entry* evas_cache_image_size_set(Image_Entry *im, int w, int h);
|
||||
EAPI Image_Entry* evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h);
|
||||
|
||||
EAPI Evas_Cache_Engine_Image* evas_cache_engine_image_init(const Evas_Cache_Engine_Image_Func *cb, Evas_Cache_Image *parent);
|
||||
EAPI void evas_cache_engine_image_shutdown(Evas_Cache_Engine_Image *cache);
|
||||
|
@ -154,11 +154,11 @@ EAPI void evas_cache_engine_parent_not_needed(Engine_Image_E
|
|||
EAPI Engine_Image_Entry* evas_cache_engine_image_engine(Evas_Cache_Engine_Image *cache, void *engine_data);
|
||||
EAPI void evas_cache_engine_image_drop(Engine_Image_Entry *eim);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_alone(Engine_Image_Entry *eim, void *data);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_dirty(Engine_Image_Entry *eim, int x, int y, int w, int h);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace, void *engine_data);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace, void *engine_data);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data);
|
||||
EAPI void evas_cache_engine_image_colorspace(Engine_Image_Entry *eim, int cspace, void *engine_data);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_size_set(Engine_Image_Entry *eim, int w, int h);
|
||||
EAPI Engine_Image_Entry* evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h);
|
||||
|
||||
EAPI void evas_cache_engine_image_load_data(Engine_Image_Entry *eim);
|
||||
|
||||
|
|
|
@ -397,7 +397,7 @@ evas_cache_engine_image_drop(Engine_Image_Entry *eim)
|
|||
}
|
||||
|
||||
EAPI Engine_Image_Entry *
|
||||
evas_cache_engine_image_dirty(Engine_Image_Entry *eim, int x, int y, int w, int h)
|
||||
evas_cache_engine_image_dirty(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h)
|
||||
{
|
||||
Engine_Image_Entry *eim_dirty = eim;
|
||||
Image_Entry *im_dirty = NULL;
|
||||
|
@ -535,7 +535,7 @@ _evas_cache_engine_image_push_dirty(Evas_Cache_Engine_Image *cache, Image_Entry
|
|||
}
|
||||
|
||||
EAPI Engine_Image_Entry *
|
||||
evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace, void *engine_data)
|
||||
evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data)
|
||||
{
|
||||
Image_Entry *im;
|
||||
|
||||
|
@ -547,7 +547,7 @@ evas_cache_engine_image_copied_data(Evas_Cache_Engine_Image *cache, int w, int h
|
|||
}
|
||||
|
||||
EAPI Engine_Image_Entry *
|
||||
evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace, void *engine_data)
|
||||
evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace, void *engine_data)
|
||||
{
|
||||
Image_Entry *im;
|
||||
|
||||
|
@ -559,7 +559,7 @@ evas_cache_engine_image_data(Evas_Cache_Engine_Image *cache, int w, int h, DATA3
|
|||
}
|
||||
|
||||
EAPI Engine_Image_Entry *
|
||||
evas_cache_engine_image_size_set(Engine_Image_Entry *eim, int w, int h)
|
||||
evas_cache_engine_image_size_set(Engine_Image_Entry *eim, unsigned int w, unsigned int h)
|
||||
{
|
||||
Evas_Cache_Engine_Image *cache;
|
||||
Engine_Image_Entry *new;
|
||||
|
|
|
@ -322,7 +322,8 @@ _evas_cache_image_entry_new(Evas_Cache_Image *cache,
|
|||
static void
|
||||
_evas_cache_image_entry_surface_alloc__locked(Evas_Cache_Image *cache,
|
||||
Image_Entry *ie,
|
||||
int wmin, int hmin)
|
||||
unsigned int wmin,
|
||||
unsigned int hmin)
|
||||
{
|
||||
if (ie->allocated.w == wmin && ie->allocated.h == hmin)
|
||||
return ;
|
||||
|
@ -539,7 +540,7 @@ evas_cache_image_get(Evas_Cache_Image *cache)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_cache_image_set(Evas_Cache_Image *cache, int limit)
|
||||
evas_cache_image_set(Evas_Cache_Image *cache, unsigned int limit)
|
||||
{
|
||||
assert(cache != NULL);
|
||||
#ifdef EVAS_FRAME_QUEUING
|
||||
|
@ -977,7 +978,7 @@ evas_cache_image_data_not_needed(Image_Entry *im)
|
|||
}
|
||||
|
||||
EAPI Image_Entry *
|
||||
evas_cache_image_dirty(Image_Entry *im, int x, int y, int w, int h)
|
||||
evas_cache_image_dirty(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h)
|
||||
{
|
||||
Image_Entry *im_dirty = im;
|
||||
Evas_Cache_Image *cache;
|
||||
|
@ -1129,7 +1130,7 @@ evas_cache_image_alone(Image_Entry *im)
|
|||
}
|
||||
|
||||
EAPI Image_Entry *
|
||||
evas_cache_image_copied_data(Evas_Cache_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace)
|
||||
evas_cache_image_copied_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace)
|
||||
{
|
||||
Image_Entry *im;
|
||||
|
||||
|
@ -1166,7 +1167,7 @@ evas_cache_image_copied_data(Evas_Cache_Image *cache, int w, int h, DATA32 *imag
|
|||
}
|
||||
|
||||
EAPI Image_Entry *
|
||||
evas_cache_image_data(Evas_Cache_Image *cache, int w, int h, DATA32 *image_data, int alpha, int cspace)
|
||||
evas_cache_image_data(Evas_Cache_Image *cache, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace)
|
||||
{
|
||||
Image_Entry *im;
|
||||
|
||||
|
@ -1200,7 +1201,7 @@ evas_cache_image_data(Evas_Cache_Image *cache, int w, int h, DATA32 *image_data,
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_cache_image_surface_alloc(Image_Entry *im, int w, int h)
|
||||
evas_cache_image_surface_alloc(Image_Entry *im, unsigned int w, unsigned int h)
|
||||
{
|
||||
Evas_Cache_Image *cache;
|
||||
|
||||
|
@ -1220,7 +1221,7 @@ evas_cache_image_surface_alloc(Image_Entry *im, int w, int h)
|
|||
}
|
||||
|
||||
EAPI Image_Entry *
|
||||
evas_cache_image_size_set(Image_Entry *im, int w, int h)
|
||||
evas_cache_image_size_set(Image_Entry *im, unsigned int w, unsigned int h)
|
||||
{
|
||||
Evas_Cache_Image *cache;
|
||||
Image_Entry *new;
|
||||
|
@ -1449,9 +1450,9 @@ evas_cache_image_flush(Evas_Cache_Image *cache)
|
|||
assert(cache);
|
||||
assert(cache->usage >= 0);
|
||||
|
||||
if (cache->limit == -1) return -1;
|
||||
if (cache->limit == (unsigned int)-1) return -1;
|
||||
|
||||
while ((cache->lru) && (cache->limit < cache->usage))
|
||||
while ((cache->lru) && (cache->limit < (unsigned int)cache->usage))
|
||||
{
|
||||
Image_Entry *im;
|
||||
|
||||
|
@ -1459,7 +1460,7 @@ evas_cache_image_flush(Evas_Cache_Image *cache)
|
|||
_evas_cache_image_entry_delete(cache, im);
|
||||
}
|
||||
|
||||
while ((cache->lru_nodata) && (cache->limit < cache->usage))
|
||||
while ((cache->lru_nodata) && (cache->limit < (unsigned int)cache->usage))
|
||||
{
|
||||
Image_Entry *im;
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ evas_common_blit_rectangle(const RGBA_Image *src, RGBA_Image *dst, int src_x, in
|
|||
|
||||
/* clip clip clip */
|
||||
if (w <= 0) return;
|
||||
if (src_x + w > src->cache_entry.w) w = src->cache_entry.w - src_x;
|
||||
if (src_x + w > (int)src->cache_entry.w) w = src->cache_entry.w - src_x;
|
||||
if (w <= 0) return;
|
||||
if (src_x < 0)
|
||||
{
|
||||
|
@ -48,7 +48,7 @@ evas_common_blit_rectangle(const RGBA_Image *src, RGBA_Image *dst, int src_x, in
|
|||
if (w <= 0) return;
|
||||
|
||||
if (h <= 0) return;
|
||||
if (src_y + h > src->cache_entry.h) h = src->cache_entry.h - src_y;
|
||||
if (src_y + h > (int)src->cache_entry.h) h = src->cache_entry.h - src_y;
|
||||
if (h <= 0) return;
|
||||
if (src_y < 0)
|
||||
{
|
||||
|
@ -59,7 +59,7 @@ evas_common_blit_rectangle(const RGBA_Image *src, RGBA_Image *dst, int src_x, in
|
|||
if (h <= 0) return;
|
||||
|
||||
if (w <= 0) return;
|
||||
if (dst_x + w > dst->cache_entry.w) w = dst->cache_entry.w - dst_x;
|
||||
if (dst_x + w > (int)dst->cache_entry.w) w = dst->cache_entry.w - dst_x;
|
||||
if (w <= 0) return;
|
||||
if (dst_x < 0)
|
||||
{
|
||||
|
@ -70,7 +70,7 @@ evas_common_blit_rectangle(const RGBA_Image *src, RGBA_Image *dst, int src_x, in
|
|||
if (w <= 0) return;
|
||||
|
||||
if (h <= 0) return;
|
||||
if (dst_y + h > dst->cache_entry.h) h = dst->cache_entry.h - dst_y;
|
||||
if (dst_y + h > (int)dst->cache_entry.h) h = dst->cache_entry.h - dst_y;
|
||||
if (h <= 0) return;
|
||||
if (dst_y < 0)
|
||||
{
|
||||
|
|
|
@ -16,10 +16,10 @@ EAPI void evas_common_image_premul (Image_Entry
|
|||
EAPI void evas_common_image_set_alpha_sparse (Image_Entry *ie); /*2*/
|
||||
/* EAPI RGBA_Image *evas_common_image_alpha_create (int w, int h); */
|
||||
/* EAPI RGBA_Image *evas_common_image_create (int w, int h); */
|
||||
EAPI RGBA_Image *evas_common_image_new (int w, int h, int alpha);
|
||||
EAPI RGBA_Image *evas_common_image_new (unsigned int w, unsigned int h, unsigned int alpha);
|
||||
EAPI Evas_Cache_Image *evas_common_image_cache_get (void);
|
||||
|
||||
EAPI void evas_common_image_set_cache (int size);
|
||||
EAPI void evas_common_image_set_cache (unsigned int size);
|
||||
EAPI int evas_common_image_get_cache (void);
|
||||
|
||||
EAPI RGBA_Image *evas_common_image_line_buffer_obtain (int len);
|
||||
|
@ -32,8 +32,8 @@ EAPI void evas_common_image_alpha_line_buffer_free (RGBA_Image *
|
|||
EAPI RGBA_Image *evas_common_load_image_from_file (const char *file, const char *key, RGBA_Image_Loadopts *lo, int *error);
|
||||
EAPI int evas_common_save_image_to_file (RGBA_Image *im, const char *file, const char *key, int quality, int compress);
|
||||
|
||||
EAPI void evas_common_rgba_image_scalecache_size_set(int size);
|
||||
EAPI int evas_common_rgba_image_scalecache_size_get(void);
|
||||
EAPI void evas_common_rgba_image_scalecache_size_set(unsigned int size);
|
||||
EAPI unsigned int evas_common_rgba_image_scalecache_size_get(void);
|
||||
EAPI void evas_common_rgba_image_scalecache_flush(void);
|
||||
|
||||
EAPI void
|
||||
|
|
|
@ -64,7 +64,7 @@ evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA3
|
|||
}
|
||||
|
||||
int
|
||||
evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, int w, int h __UNUSED__)
|
||||
evas_common_rgba_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h __UNUSED__)
|
||||
{
|
||||
RGBA_Image *dst = (RGBA_Image *) ie_dst;
|
||||
RGBA_Image *im = (RGBA_Image *) ie_im;
|
||||
|
|
|
@ -33,13 +33,13 @@ static int reference = 0;
|
|||
static Image_Entry *_evas_common_rgba_image_new(void);
|
||||
static void _evas_common_rgba_image_delete(Image_Entry *ie);
|
||||
|
||||
static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, int w, int h);
|
||||
static int _evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h);
|
||||
static void _evas_common_rgba_image_surface_delete(Image_Entry *ie);
|
||||
static DATA32 *_evas_common_rgba_image_surface_pixels(Image_Entry *ie);
|
||||
|
||||
static void _evas_common_rgba_image_unload(Image_Entry *im);
|
||||
|
||||
static void _evas_common_rgba_image_dirty_region(Image_Entry *im, int x, int y, int w, int h);
|
||||
static void _evas_common_rgba_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
|
||||
static int _evas_common_rgba_image_ram_usage(Image_Entry *ie);
|
||||
|
||||
|
@ -225,7 +225,7 @@ evas_common_rgba_image_unload(Image_Entry *ie)
|
|||
}
|
||||
|
||||
static int
|
||||
_evas_common_rgba_image_surface_alloc(Image_Entry *ie, int w, int h)
|
||||
_evas_common_rgba_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h)
|
||||
{
|
||||
RGBA_Image *im = (RGBA_Image *) ie;
|
||||
size_t siz = 0;
|
||||
|
@ -296,7 +296,7 @@ _evas_common_rgba_image_unload(Image_Entry *im)
|
|||
}
|
||||
|
||||
static void
|
||||
_evas_common_rgba_image_dirty_region(Image_Entry* ie, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
|
||||
_evas_common_rgba_image_dirty_region(Image_Entry* ie, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__)
|
||||
{
|
||||
RGBA_Image *im = (RGBA_Image *) ie;
|
||||
|
||||
|
@ -444,7 +444,7 @@ evas_common_image_surface_alpha_tiles_calc(RGBA_Surface *is, int tsize)
|
|||
/* } */
|
||||
|
||||
static RGBA_Image *
|
||||
evas_common_image_create(int w, int h)
|
||||
evas_common_image_create(unsigned int w, unsigned int h)
|
||||
{
|
||||
RGBA_Image *im;
|
||||
|
||||
|
@ -462,7 +462,7 @@ evas_common_image_create(int w, int h)
|
|||
}
|
||||
|
||||
EAPI RGBA_Image *
|
||||
evas_common_image_alpha_create(int w, int h)
|
||||
evas_common_image_alpha_create(unsigned int w, unsigned int h)
|
||||
{
|
||||
RGBA_Image *im;
|
||||
|
||||
|
@ -481,7 +481,7 @@ evas_common_image_alpha_create(int w, int h)
|
|||
}
|
||||
|
||||
EAPI RGBA_Image *
|
||||
evas_common_image_new(int w, int h, int alpha)
|
||||
evas_common_image_new(unsigned int w, unsigned int h, unsigned int alpha)
|
||||
{
|
||||
if (alpha)
|
||||
return evas_common_image_alpha_create(w, h);
|
||||
|
@ -527,7 +527,7 @@ evas_common_image_colorspace_dirty(RGBA_Image *im)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
evas_common_image_set_cache(int size)
|
||||
evas_common_image_set_cache(unsigned int size)
|
||||
{
|
||||
if (eci)
|
||||
evas_cache_image_set(eci, size);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef _EVAS_IMAGE_PRIVATE_H
|
||||
#define _EVAS_IMAGE_PRIVATE_H
|
||||
|
||||
int evas_common_rgba_image_size_set (Image_Entry* dst, const Image_Entry* im, int w, int h);
|
||||
int evas_common_rgba_image_from_copied_data (Image_Entry* dst, int w, int h, DATA32 *image_data, int alpha, int cspace);
|
||||
int evas_common_rgba_image_from_data (Image_Entry* dst, int w, int h, DATA32 *image_data, int alpha, int cspace);
|
||||
int evas_common_rgba_image_size_set (Image_Entry* dst, const Image_Entry* im, unsigned int w, unsigned int h);
|
||||
int evas_common_rgba_image_from_copied_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
|
||||
int evas_common_rgba_image_from_data (Image_Entry* dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
|
||||
int evas_common_rgba_image_colorspace_set (Image_Entry* dst, int cspace);
|
||||
|
||||
void evas_common_scalecache_init(void);
|
||||
|
|
|
@ -64,11 +64,11 @@ FUNC_NAME(RGBA_Image *src, RGBA_Image *dst,
|
|||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
if (p[i].u < 0) p[i].u = 0;
|
||||
else if (p[i].u > (src->cache_entry.w << FP))
|
||||
else if (p[i].u > (int)(src->cache_entry.w << FP))
|
||||
p[i].u = src->cache_entry.w << FP;
|
||||
|
||||
if (p[i].v < 0) p[i].v = 0;
|
||||
else if (p[i].v > (src->cache_entry.h << FP))
|
||||
else if (p[i].v > (int)(src->cache_entry.h << FP))
|
||||
p[i].v = src->cache_entry.h << FP;
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,7 @@ evas_common_soft16_image_convert_from_rgba(Soft16_Image *im, const DATA32 *src)
|
|||
const DATA32 *sp;
|
||||
DATA16 *dp;
|
||||
DATA8 *ap;
|
||||
int y;
|
||||
unsigned int y;
|
||||
|
||||
sp = src;
|
||||
dp = im->pixels;
|
||||
|
@ -283,7 +283,7 @@ evas_common_soft16_image_convert_from_rgb(Soft16_Image *im, const DATA32 *src)
|
|||
{
|
||||
const DATA32 *sp;
|
||||
DATA16 *dp;
|
||||
int y;
|
||||
unsigned int y;
|
||||
|
||||
sp = src;
|
||||
dp = im->pixels;
|
||||
|
|
|
@ -6,21 +6,21 @@ static int reference = 0;
|
|||
static Image_Entry *_evas_common_soft16_image_new(void);
|
||||
static void _evas_common_soft16_image_delete(Image_Entry *ie);
|
||||
|
||||
static int _evas_common_soft16_image_surface_alloc(Image_Entry *ie, int w, int h);
|
||||
static int _evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h);
|
||||
static void _evas_common_soft16_image_surface_delete(Image_Entry *ie);
|
||||
static DATA32 *_evas_common_soft16_image_surface_pixels(Image_Entry *ie);
|
||||
|
||||
static int _evas_common_load_soft16_image_from_file(Image_Entry *ie);
|
||||
static void _evas_common_soft16_image_unload(Image_Entry *ie);
|
||||
|
||||
static void _evas_common_soft16_image_dirty_region(Image_Entry *im, int x, int y, int w, int h);
|
||||
static void _evas_common_soft16_image_dirty_region(Image_Entry *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
static int _evas_common_soft16_image_dirty(Image_Entry *ie_dst, const Image_Entry *ie_src);
|
||||
|
||||
static int _evas_common_soft16_image_ram_usage(Image_Entry *ie);
|
||||
|
||||
static int _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, int w, int h);
|
||||
static int _evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace);
|
||||
static int _evas_common_soft16_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace);
|
||||
static int _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w, unsigned int h);
|
||||
static int _evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
|
||||
static int _evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace);
|
||||
static int _evas_common_soft16_image_colorspace_set(Image_Entry* ie_dst, int cspace);
|
||||
|
||||
static int _evas_common_load_soft16_image_data_from_file(Image_Entry *ie);
|
||||
|
@ -112,7 +112,7 @@ _evas_common_soft16_image_delete(Image_Entry *ie)
|
|||
}
|
||||
|
||||
static int
|
||||
_evas_common_soft16_image_surface_alloc(Image_Entry *ie, int w, int h)
|
||||
_evas_common_soft16_image_surface_alloc(Image_Entry *ie, unsigned int w, unsigned int h)
|
||||
{
|
||||
Soft16_Image *im = (Soft16_Image *) ie;
|
||||
|
||||
|
@ -181,7 +181,7 @@ _evas_common_soft16_image_unload(Image_Entry *ie __UNUSED__)
|
|||
}
|
||||
|
||||
static void
|
||||
_evas_common_soft16_image_dirty_region(Image_Entry *im __UNUSED__, int x __UNUSED__, int y __UNUSED__, int w __UNUSED__, int h __UNUSED__)
|
||||
_evas_common_soft16_image_dirty_region(Image_Entry *im __UNUSED__, unsigned int x __UNUSED__, unsigned int y __UNUSED__, unsigned int w __UNUSED__, unsigned int h __UNUSED__)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ _evas_common_soft16_image_ram_usage(Image_Entry *ie)
|
|||
}
|
||||
|
||||
static int
|
||||
_evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, int w __UNUSED__, int h __UNUSED__)
|
||||
_evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im, unsigned int w __UNUSED__, unsigned int h __UNUSED__)
|
||||
{
|
||||
Soft16_Image *dst = (Soft16_Image *) ie_dst;
|
||||
Soft16_Image *im = (Soft16_Image *) ie_im;
|
||||
|
@ -222,7 +222,7 @@ _evas_common_soft16_image_size_set(Image_Entry *ie_dst, const Image_Entry *ie_im
|
|||
}
|
||||
|
||||
static int
|
||||
_evas_common_soft16_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *image_data, int alpha, int cspace __UNUSED__)
|
||||
_evas_common_soft16_image_from_data(Image_Entry* ie_dst, unsigned int w, unsigned int h, DATA32 *image_data, int alpha, int cspace __UNUSED__)
|
||||
{
|
||||
Soft16_Image *im = (Soft16_Image *) ie_dst;
|
||||
|
||||
|
@ -245,7 +245,7 @@ _evas_common_soft16_image_from_data(Image_Entry* ie_dst, int w, int h, DATA32 *i
|
|||
}
|
||||
|
||||
static int
|
||||
_evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, int w __UNUSED__, int h, DATA32 *image_data, int alpha __UNUSED__, int cspace __UNUSED__)
|
||||
_evas_common_soft16_image_from_copied_data(Image_Entry* ie_dst, unsigned int w __UNUSED__, unsigned int h, DATA32 *image_data, int alpha __UNUSED__, int cspace __UNUSED__)
|
||||
{
|
||||
Soft16_Image *im = (Soft16_Image *) ie_dst;
|
||||
|
||||
|
@ -337,8 +337,8 @@ _get_clip(const RGBA_Draw_Context *dc, const Soft16_Image *im,
|
|||
clip->h += clip->y;
|
||||
clip->y = 0;
|
||||
}
|
||||
if ((clip->x + clip->w) > im->cache_entry.w) clip->w = im->cache_entry.w - clip->x;
|
||||
if ((clip->y + clip->h) > im->cache_entry.h) clip->h = im->cache_entry.h - clip->y;
|
||||
if ((clip->x + clip->w) > (int)im->cache_entry.w) clip->w = im->cache_entry.w - clip->x;
|
||||
if ((clip->y + clip->h) > (int)im->cache_entry.h) clip->h = im->cache_entry.h - clip->y;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -6,31 +6,23 @@ static int reference = 0;
|
|||
static Image_Entry *_evas_common_soft8_image_new(void);
|
||||
static void _evas_common_soft8_image_delete(Image_Entry * ie);
|
||||
|
||||
static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, int w,
|
||||
int h);
|
||||
static int _evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h);
|
||||
static void _evas_common_soft8_image_surface_delete(Image_Entry * ie);
|
||||
static DATA32 *_evas_common_soft8_image_surface_pixels(Image_Entry * ie);
|
||||
|
||||
static int _evas_common_load_soft8_image_from_file(Image_Entry * ie);
|
||||
static void _evas_common_soft8_image_unload(Image_Entry * ie);
|
||||
|
||||
static void _evas_common_soft8_image_dirty_region(Image_Entry * im, int x,
|
||||
int y, int w, int h);
|
||||
static void _evas_common_soft8_image_dirty_region(Image_Entry * im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
static int _evas_common_soft8_image_dirty(Image_Entry * ie_dst,
|
||||
const Image_Entry * ie_src);
|
||||
|
||||
static int _evas_common_soft8_image_ram_usage(Image_Entry * ie);
|
||||
|
||||
static int _evas_common_soft8_image_size_set(Image_Entry * ie_dst,
|
||||
const Image_Entry * ie_im, int w,
|
||||
int h);
|
||||
static int _evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst,
|
||||
int w, int h,
|
||||
DATA32 * image_data,
|
||||
int alpha, int cspace);
|
||||
static int _evas_common_soft8_image_from_data(Image_Entry * ie_dst, int w,
|
||||
int h, DATA32 * image_data,
|
||||
int alpha, int cspace);
|
||||
const Image_Entry * ie_im, unsigned int w, unsigned int h);
|
||||
static int _evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace);
|
||||
static int _evas_common_soft8_image_from_data(Image_Entry * ie_dst, unsigned int w, unsigned int h, DATA32 * image_data, int alpha, int cspace);
|
||||
static int _evas_common_soft8_image_colorspace_set(Image_Entry * ie_dst,
|
||||
int cspace);
|
||||
|
||||
|
@ -125,7 +117,7 @@ _evas_common_soft8_image_delete(Image_Entry * ie)
|
|||
}
|
||||
|
||||
static int
|
||||
_evas_common_soft8_image_surface_alloc(Image_Entry * ie, int w, int h)
|
||||
_evas_common_soft8_image_surface_alloc(Image_Entry * ie, unsigned int w, unsigned int h)
|
||||
{
|
||||
Soft8_Image *im = (Soft8_Image *) ie;
|
||||
|
||||
|
@ -203,8 +195,10 @@ _evas_common_soft8_image_unload(Image_Entry * ie __UNUSED__)
|
|||
|
||||
static void
|
||||
_evas_common_soft8_image_dirty_region(Image_Entry * im __UNUSED__,
|
||||
int x __UNUSED__, int y __UNUSED__,
|
||||
int w __UNUSED__, int h __UNUSED__)
|
||||
unsigned int x __UNUSED__,
|
||||
unsigned int y __UNUSED__,
|
||||
unsigned int w __UNUSED__,
|
||||
unsigned int h __UNUSED__)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -235,8 +229,9 @@ _evas_common_soft8_image_ram_usage(Image_Entry * ie)
|
|||
|
||||
static int
|
||||
_evas_common_soft8_image_size_set(Image_Entry * ie_dst,
|
||||
const Image_Entry * ie_im, int w __UNUSED__,
|
||||
int h __UNUSED__)
|
||||
const Image_Entry * ie_im,
|
||||
unsigned int w __UNUSED__,
|
||||
unsigned int h __UNUSED__)
|
||||
{
|
||||
Soft8_Image *dst = (Soft8_Image *) ie_dst;
|
||||
Soft8_Image *im = (Soft8_Image *) ie_im;
|
||||
|
@ -247,7 +242,8 @@ _evas_common_soft8_image_size_set(Image_Entry * ie_dst,
|
|||
}
|
||||
|
||||
static int
|
||||
_evas_common_soft8_image_from_data(Image_Entry * ie_dst, int w, int h,
|
||||
_evas_common_soft8_image_from_data(Image_Entry * ie_dst,
|
||||
unsigned int w, unsigned int h,
|
||||
DATA32 * image_data, int alpha,
|
||||
int cspace __UNUSED__)
|
||||
{
|
||||
|
@ -273,7 +269,8 @@ _evas_common_soft8_image_from_data(Image_Entry * ie_dst, int w, int h,
|
|||
|
||||
static int
|
||||
_evas_common_soft8_image_from_copied_data(Image_Entry * ie_dst,
|
||||
int w __UNUSED__, int h,
|
||||
unsigned int w __UNUSED__,
|
||||
unsigned int h,
|
||||
DATA32 * image_data,
|
||||
int alpha __UNUSED__,
|
||||
int cspace __UNUSED__)
|
||||
|
@ -330,7 +327,7 @@ _evas_common_load_soft8_image_data_from_file(Image_Entry * ie)
|
|||
}
|
||||
|
||||
/* Soft16_Image * */
|
||||
/* evas_common_soft16_image_new(int w, int h, int stride, int have_alpha, DATA16 *pixels, */
|
||||
/* evas_common_soft16_image_new(int w, unsigned int h, unsigned int stride, int have_alpha, DATA16 *pixels, */
|
||||
/* int copy) */
|
||||
/* { */
|
||||
/* Soft16_Image *im; */
|
||||
|
@ -371,9 +368,9 @@ _get_clip(const RGBA_Draw_Context * dc, const Soft8_Image * im,
|
|||
clip->h += clip->y;
|
||||
clip->y = 0;
|
||||
}
|
||||
if ((clip->x + clip->w) > im->cache_entry.w)
|
||||
if ((clip->x + clip->w) > (int)im->cache_entry.w)
|
||||
clip->w = im->cache_entry.w - clip->x;
|
||||
if ((clip->y + clip->h) > im->cache_entry.h)
|
||||
if ((clip->y + clip->h) > (int)im->cache_entry.h)
|
||||
clip->h = im->cache_entry.h - clip->y;
|
||||
}
|
||||
else
|
||||
|
@ -407,8 +404,7 @@ _shrink(int *s_pos, int *s_size, int pos, int size)
|
|||
|
||||
static int
|
||||
_soft8_adjust_areas(Eina_Rectangle * src,
|
||||
int src_max_x, int src_max_y,
|
||||
Eina_Rectangle * dst,
|
||||
int src_max_x, int src_max_y, Eina_Rectangle * dst,
|
||||
int dst_max_x, int dst_max_y, Eina_Rectangle * dst_clip)
|
||||
{
|
||||
if (_is_empty_rectangle(src) ||
|
||||
|
@ -524,7 +520,8 @@ evas_common_soft8_image_draw(Soft8_Image * src, Soft8_Image * dst,
|
|||
int src_region_x, int src_region_y,
|
||||
int src_region_w, int src_region_h,
|
||||
int dst_region_x, int dst_region_y,
|
||||
int dst_region_w, int dst_region_h, int smooth __UNUSED__)
|
||||
int dst_region_w, int dst_region_h,
|
||||
int smooth __UNUSED__)
|
||||
{
|
||||
Eina_Rectangle sr, dr;
|
||||
Cutout_Rects *rects;
|
||||
|
@ -605,7 +602,7 @@ evas_common_soft8_image_alpha_set(Soft8_Image * im, int have_alpha)
|
|||
}
|
||||
|
||||
/* Soft16_Image * */
|
||||
/* evas_common_soft16_image_size_set(Soft16_Image *old_im, int w, int h) */
|
||||
/* evas_common_soft16_image_size_set(Soft16_Image *old_im, unsigned int w, unsigned int h) */
|
||||
/* { */
|
||||
/* Soft16_Image *new_im; */
|
||||
/* DATA16 *dp, *sp; */
|
||||
|
|
|
@ -487,9 +487,9 @@ struct _RGBA_Image_Loadopts
|
|||
{
|
||||
int scale_down_by; // if > 1 then use this
|
||||
double dpi; // if > 0.0 use this
|
||||
int w, h; // if > 0 use this
|
||||
unsigned int w, h; // if > 0 use this
|
||||
struct {
|
||||
int x, y, w, h;
|
||||
unsigned int x, y, w, h;
|
||||
} region;
|
||||
};
|
||||
|
||||
|
@ -554,13 +554,13 @@ struct _Image_Entry
|
|||
|
||||
RGBA_Image_Loadopts load_opts;
|
||||
int space;
|
||||
int w;
|
||||
int h;
|
||||
unsigned int w;
|
||||
unsigned int h;
|
||||
|
||||
struct
|
||||
{
|
||||
int w;
|
||||
int h;
|
||||
unsigned int w;
|
||||
unsigned int h;
|
||||
} allocated;
|
||||
|
||||
struct
|
||||
|
|
|
@ -32,12 +32,10 @@ extern "C" {
|
|||
((((g) >> 2) & 0x3f) << 5) | \
|
||||
(((b) >> 3) & 0x1f))
|
||||
|
||||
static inline int
|
||||
_calc_stride(int w)
|
||||
static inline unsigned int
|
||||
_calc_stride(unsigned int w)
|
||||
{
|
||||
int pad;
|
||||
|
||||
pad = w % 4;
|
||||
unsigned int pad = w % 4;
|
||||
if (!pad) return w;
|
||||
else return w + 4 - pad;
|
||||
}
|
||||
|
|
|
@ -441,30 +441,30 @@ void evas_gl_common_shader_program_shutdown(Evas_GL_Program *p);
|
|||
void evas_gl_common_rect_draw(Evas_GL_Context *gc, int x, int y, int w, int h);
|
||||
|
||||
Evas_GL_Texture *evas_gl_common_texture_new(Evas_GL_Context *gc, RGBA_Image *im);
|
||||
Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_GL_Context *gc, int w, int h, int alpha, Evas_GL_Image *im);
|
||||
Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_GL_Context *gc, int w, int h, int alpha);
|
||||
Evas_GL_Texture *evas_gl_common_texture_native_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im);
|
||||
Evas_GL_Texture *evas_gl_common_texture_render_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
|
||||
Evas_GL_Texture *evas_gl_common_texture_dynamic_new(Evas_GL_Context *gc, Evas_GL_Image *im);
|
||||
void evas_gl_common_texture_update(Evas_GL_Texture *tex, RGBA_Image *im);
|
||||
void evas_gl_common_texture_free(Evas_GL_Texture *tex);
|
||||
Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels, int w, int h, int fh);
|
||||
void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, int w, int h, int fh);
|
||||
Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, int w, int h);
|
||||
void evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, int w, int h);
|
||||
Evas_GL_Texture *evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
|
||||
void evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels, unsigned int w, unsigned int h, int fh);
|
||||
Evas_GL_Texture *evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h);
|
||||
void evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h);
|
||||
|
||||
void evas_gl_common_image_all_unload(Evas_GL_Context *gc);
|
||||
|
||||
Evas_GL_Image *evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key, Evas_Image_Load_Opts *lo, int *error);
|
||||
Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, DATA32 *data, int alpha, int cspace);
|
||||
Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, int w, int h, DATA32 *data, int alpha, int cspace);
|
||||
Evas_GL_Image *evas_gl_common_image_new(Evas_GL_Context *gc, int w, int h, int alpha, int cspace);
|
||||
Evas_GL_Image *evas_gl_common_image_new_from_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace);
|
||||
Evas_GL_Image *evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace);
|
||||
Evas_GL_Image *evas_gl_common_image_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace);
|
||||
Evas_GL_Image *evas_gl_common_image_alpha_set(Evas_GL_Image *im, int alpha);
|
||||
void evas_gl_common_image_native_enable(Evas_GL_Image *im);
|
||||
void evas_gl_common_image_native_disable(Evas_GL_Image *im);
|
||||
void evas_gl_common_image_scale_hint_set(Evas_GL_Image *im, int hint);
|
||||
void evas_gl_common_image_content_hint_set(Evas_GL_Image *im, int hint);
|
||||
void evas_gl_common_image_free(Evas_GL_Image *im);
|
||||
Evas_GL_Image *evas_gl_common_image_surface_new(Evas_GL_Context *gc, int w, int h, int alpha);
|
||||
void evas_gl_common_image_dirty(Evas_GL_Image *im, int x, int y, int w, int h);
|
||||
Evas_GL_Image *evas_gl_common_image_surface_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha);
|
||||
void evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
void evas_gl_common_image_map4_draw(Evas_GL_Context *gc, Evas_GL_Image *im, RGBA_Map_Point *p, int smooth, int level);
|
||||
void evas_gl_common_image_draw(Evas_GL_Context *gc, Evas_GL_Image *im, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, int smooth);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ evas_gl_common_image_load(Evas_GL_Context *gc, const char *file, const char *key
|
|||
}
|
||||
|
||||
Evas_GL_Image *
|
||||
evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, DATA32 *data, int alpha, int cspace)
|
||||
evas_gl_common_image_new_from_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace)
|
||||
{
|
||||
Evas_GL_Image *im;
|
||||
Eina_List *l;
|
||||
|
@ -118,7 +118,7 @@ evas_gl_common_image_new_from_data(Evas_GL_Context *gc, int w, int h, DATA32 *da
|
|||
}
|
||||
|
||||
Evas_GL_Image *
|
||||
evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, int w, int h, DATA32 *data, int alpha, int cspace)
|
||||
evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, unsigned int w, unsigned int h, DATA32 *data, int alpha, int cspace)
|
||||
{
|
||||
Evas_GL_Image *im;
|
||||
|
||||
|
@ -159,7 +159,7 @@ evas_gl_common_image_new_from_copied_data(Evas_GL_Context *gc, int w, int h, DAT
|
|||
}
|
||||
|
||||
Evas_GL_Image *
|
||||
evas_gl_common_image_new(Evas_GL_Context *gc, int w, int h, int alpha, int cspace)
|
||||
evas_gl_common_image_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, int cspace)
|
||||
{
|
||||
Evas_GL_Image *im;
|
||||
|
||||
|
@ -362,7 +362,7 @@ evas_gl_common_image_free(Evas_GL_Image *im)
|
|||
}
|
||||
|
||||
Evas_GL_Image *
|
||||
evas_gl_common_image_surface_new(Evas_GL_Context *gc, int w, int h, int alpha)
|
||||
evas_gl_common_image_surface_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha)
|
||||
{
|
||||
Evas_GL_Image *im;
|
||||
|
||||
|
@ -380,7 +380,7 @@ evas_gl_common_image_surface_new(Evas_GL_Context *gc, int w, int h, int alpha)
|
|||
}
|
||||
|
||||
void
|
||||
evas_gl_common_image_dirty(Evas_GL_Image *im, int x, int y, int w, int h)
|
||||
evas_gl_common_image_dirty(Evas_GL_Image *im, unsigned int x, unsigned int y, unsigned int w, unsigned int h)
|
||||
{
|
||||
if ((w == 0) && (h == 0) && (x == 0) && (y == 0))
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ static struct {
|
|||
} c, a, v, r, n, d;
|
||||
} texinfo = {0};
|
||||
|
||||
static int
|
||||
static void
|
||||
_print_tex_count(void)
|
||||
{
|
||||
if (getenv("EVAS_GL_MEMINFO"))
|
||||
|
@ -117,7 +117,7 @@ _tex_sub_2d(int x, int y, int w, int h, int fmt, int type, const void *pix)
|
|||
}
|
||||
|
||||
static Evas_GL_Texture_Pool *
|
||||
_pool_tex_new(Evas_GL_Context *gc, int w, int h, int intformat, int format)
|
||||
_pool_tex_new(Evas_GL_Context *gc, int w, int h, int intformat, GLenum format)
|
||||
{
|
||||
Evas_GL_Texture_Pool *pt;
|
||||
|
||||
|
@ -680,7 +680,7 @@ pt_unref(Evas_GL_Texture_Pool *pt)
|
|||
}
|
||||
|
||||
Evas_GL_Texture *
|
||||
evas_gl_common_texture_native_new(Evas_GL_Context *gc, int w, int h, int alpha, Evas_GL_Image *im)
|
||||
evas_gl_common_texture_native_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha, Evas_GL_Image *im)
|
||||
{
|
||||
Evas_GL_Texture *tex;
|
||||
|
||||
|
@ -722,7 +722,7 @@ evas_gl_common_texture_native_new(Evas_GL_Context *gc, int w, int h, int alpha,
|
|||
}
|
||||
|
||||
Evas_GL_Texture *
|
||||
evas_gl_common_texture_render_new(Evas_GL_Context *gc, int w, int h, int alpha)
|
||||
evas_gl_common_texture_render_new(Evas_GL_Context *gc, unsigned int w, unsigned int h, int alpha)
|
||||
{
|
||||
Evas_GL_Texture *tex;
|
||||
|
||||
|
@ -915,8 +915,8 @@ evas_gl_common_texture_free(Evas_GL_Texture *tex)
|
|||
}
|
||||
|
||||
Evas_GL_Texture *
|
||||
evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels,
|
||||
int w, int h, int fh)
|
||||
evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels,
|
||||
unsigned int w, unsigned int h, int fh)
|
||||
{
|
||||
Evas_GL_Texture *tex;
|
||||
Eina_List *l_after = NULL;
|
||||
|
@ -954,8 +954,8 @@ evas_gl_common_texture_alpha_new(Evas_GL_Context *gc, DATA8 *pixels,
|
|||
}
|
||||
|
||||
void
|
||||
evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels,
|
||||
int w, int h, int fh)
|
||||
evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels,
|
||||
unsigned int w, unsigned int h, int fh)
|
||||
{
|
||||
if (!tex->pt) return;
|
||||
glBindTexture(GL_TEXTURE_2D, tex->pt->texture);
|
||||
|
@ -976,7 +976,7 @@ evas_gl_common_texture_alpha_update(Evas_GL_Texture *tex, DATA8 *pixels,
|
|||
}
|
||||
|
||||
Evas_GL_Texture *
|
||||
evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, int w, int h)
|
||||
evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, unsigned int w, unsigned int h)
|
||||
{
|
||||
Evas_GL_Texture *tex;
|
||||
// Eina_List *l_after = NULL;
|
||||
|
@ -1047,7 +1047,7 @@ evas_gl_common_texture_yuv_new(Evas_GL_Context *gc, DATA8 **rows, int w, int h)
|
|||
}
|
||||
|
||||
void
|
||||
evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, int w, int h)
|
||||
evas_gl_common_texture_yuv_update(Evas_GL_Texture *tex, DATA8 **rows, unsigned int w, unsigned int h)
|
||||
{
|
||||
if (!tex->pt) return;
|
||||
// FIXME: works on lowest size 4 pixel high buffers. must also be multiple of 2
|
||||
|
|
|
@ -1098,8 +1098,8 @@ eng_image_native_set(void *data, void *image, void *native)
|
|||
pm = ns->data.x11.pixmap;
|
||||
if (im->native.data)
|
||||
{
|
||||
Evas_Native_Surface *n = im->native.data;
|
||||
if ((n->data.x11.visual == vis) && (n->data.x11.pixmap == pm))
|
||||
Evas_Native_Surface *ens = im->native.data;
|
||||
if ((ens->data.x11.visual == vis) && (ens->data.x11.pixmap == pm))
|
||||
return im;
|
||||
}
|
||||
}
|
||||
|
@ -1204,8 +1204,8 @@ eng_image_native_set(void *data, void *image, void *native)
|
|||
if (n)
|
||||
{
|
||||
int pixmap_att[20];
|
||||
int target = 0;
|
||||
int i = 0;
|
||||
unsigned int target = 0;
|
||||
unsigned int i = 0;
|
||||
|
||||
eina_hash_add(re->win->gl_context->shared->native_hash, &pmid, im);
|
||||
if ((re->win->depth_cfg[depth].tex_target &
|
||||
|
@ -1403,7 +1403,9 @@ eng_image_size_set(void *data, void *image, int w, int h)
|
|||
if ((eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P601_PL) ||
|
||||
(eng_image_colorspace_get(data, image) == EVAS_COLORSPACE_YCBCR422P709_PL))
|
||||
w &= ~0x1;
|
||||
if ((im_old) && (im_old->im->cache_entry.w == w) && (im_old->im->cache_entry.h == h))
|
||||
if ((im_old) &&
|
||||
((int)im_old->im->cache_entry.w == w) &&
|
||||
((int)im_old->im->cache_entry.h == h))
|
||||
return image;
|
||||
if (im_old)
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@ static void _sdl16_image_delete (Engine_Image_Entry *e
|
|||
static int _sdl16_image_constructor (Engine_Image_Entry *ie, void* data);
|
||||
static void _sdl16_image_destructor (Engine_Image_Entry *eim);
|
||||
|
||||
static void _sdl16_image_dirty_region(Engine_Image_Entry *eim, int x, int y, int w, int h);
|
||||
static void _sdl16_image_dirty_region(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
|
||||
|
||||
static int _sdl16_image_dirty (Engine_Image_Entry *dst, const Engine_Image_Entry *src);
|
||||
|
||||
|
@ -84,12 +84,12 @@ static void
|
|||
_tmp_out_alloc(Render_Engine *re)
|
||||
{
|
||||
Tilebuf_Rect *r;
|
||||
int w = 0, h = 0;
|
||||
unsigned int w = 0, h = 0;
|
||||
|
||||
EINA_INLIST_FOREACH(re->rects, r)
|
||||
{
|
||||
if (r->w > w) w = r->w;
|
||||
if (r->h > h) h = r->h;
|
||||
if (r->w > (int)w) w = r->w;
|
||||
if (r->h > (int)h) h = r->h;
|
||||
}
|
||||
|
||||
if (re->tmp_out)
|
||||
|
@ -469,8 +469,8 @@ _tmp_out_process(Render_Engine *re, int out_x, int out_y, int w, int h)
|
|||
d = (Soft16_Image *) re->soft16_engine_image->cache_entry.src;
|
||||
s = re->tmp_out;
|
||||
|
||||
if ((w < 1) || (h < 1)
|
||||
|| (out_x >= d->cache_entry.w) || (out_y >= d->cache_entry.h))
|
||||
if ((w < 1) || (h < 1) ||
|
||||
(out_x >= (int)d->cache_entry.w) || (out_y >= (int)d->cache_entry.h))
|
||||
return;
|
||||
|
||||
if (re->rot == 90)
|
||||
|
@ -1167,7 +1167,7 @@ _sdl16_image_destructor(Engine_Image_Entry *eim)
|
|||
}
|
||||
|
||||
static void
|
||||
_sdl16_image_dirty_region(Engine_Image_Entry *eim, int x, int y, int w, int h)
|
||||
_sdl16_image_dirty_region(Engine_Image_Entry *eim, unsigned int x, unsigned int y, unsigned int w, unsigned int h)
|
||||
{
|
||||
SDL_Engine_Image_Entry *dst;
|
||||
RGBA_Image *im;
|
||||
|
|
|
@ -120,12 +120,12 @@ static void
|
|||
_tmp_out_alloc(Render_Engine *re)
|
||||
{
|
||||
Tilebuf_Rect *r;
|
||||
int w = 0, h = 0;
|
||||
unsigned int w = 0, h = 0;
|
||||
|
||||
EINA_INLIST_FOREACH(re->rects, r)
|
||||
{
|
||||
if (r->w > w) w = r->w;
|
||||
if (r->h > h) h = r->h;
|
||||
if (r->w > (int)w) w = r->w;
|
||||
if (r->h > (int)h) h = r->h;
|
||||
}
|
||||
|
||||
if (re->tmp_out)
|
||||
|
@ -555,7 +555,8 @@ _tmp_out_process(Render_Engine *re, int out_x, int out_y, int w, int h)
|
|||
d = re->shbuf->im;
|
||||
s = re->tmp_out;
|
||||
|
||||
if ((w < 1) || (h < 1) || (out_x >= d->cache_entry.w) || (out_y >= d->cache_entry.h))
|
||||
if ((w < 1) || (h < 1) ||
|
||||
(out_x >= (int)d->cache_entry.w) || (out_y >= (int)d->cache_entry.h))
|
||||
return;
|
||||
|
||||
if (re->rot == 90)
|
||||
|
|
|
@ -78,13 +78,13 @@ static void
|
|||
_tmp_out_alloc(Render_Engine * re)
|
||||
{
|
||||
Tilebuf_Rect *r;
|
||||
int w = 0, h = 0;
|
||||
unsigned int w = 0, h = 0;
|
||||
|
||||
EINA_INLIST_FOREACH(re->rects, r)
|
||||
{
|
||||
if (r->w > w)
|
||||
if (r->w > (int)w)
|
||||
w = r->w;
|
||||
if (r->h > h)
|
||||
if (r->h > (int)h)
|
||||
h = r->h;
|
||||
}
|
||||
|
||||
|
@ -512,8 +512,9 @@ _tmp_out_process(Render_Engine * re, int out_x, int out_y, int w, int h)
|
|||
d = re->shbuf->im;
|
||||
s = re->tmp_out;
|
||||
|
||||
if ((w < 1) || (h < 1) || (out_x >= d->cache_entry.w)
|
||||
|| (out_y >= d->cache_entry.h))
|
||||
if ((w < 1) || (h < 1) ||
|
||||
(out_x >= (int)d->cache_entry.w) ||
|
||||
(out_y >= (int)d->cache_entry.h))
|
||||
return;
|
||||
|
||||
if (re->rot == 90)
|
||||
|
|
|
@ -520,12 +520,12 @@ eng_image_map4_draw(void *data __UNUSED__, void *context, void *surface, void *i
|
|||
(p[0].y <= p[2].y) &&
|
||||
(p[0].u == 0) &&
|
||||
(p[0].v == 0) &&
|
||||
(p[1].u == (im->cache_entry.w << FP)) &&
|
||||
(p[1].u == (int)(im->cache_entry.w << FP)) &&
|
||||
(p[1].v == 0) &&
|
||||
(p[2].u == (im->cache_entry.w << FP)) &&
|
||||
(p[2].v == (im->cache_entry.h << FP)) &&
|
||||
(p[2].u == (int)(im->cache_entry.w << FP)) &&
|
||||
(p[2].v == (int)(im->cache_entry.h << FP)) &&
|
||||
(p[3].u == 0) &&
|
||||
(p[3].v == (im->cache_entry.h << FP)) &&
|
||||
(p[3].v == (int)(im->cache_entry.h << FP)) &&
|
||||
(p[0].col == 0xffffffff) &&
|
||||
(p[1].col == 0xffffffff) &&
|
||||
(p[2].col == 0xffffffff) &&
|
||||
|
|
|
@ -121,7 +121,7 @@ struct _Render_Engine
|
|||
|
||||
Ximage_Info *(*ximage_info_get)(Display *connection, Drawable draw, Visual *vis);
|
||||
void (*ximage_info_free)(Ximage_Info *xinf);
|
||||
void (*ximage_info_pool_flush)(Ximage_Info *xinf, int max_num, int max_mem);
|
||||
void (*ximage_info_pool_flush)(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem);
|
||||
Ximage_Image *(*ximage_new)(Ximage_Info *xinf, int w, int h, int depth);
|
||||
void (*ximage_free)(Ximage_Image *xim);
|
||||
void (*ximage_put)(Ximage_Image *xim, Drawable draw, int x, int y, int w, int h);
|
||||
|
|
|
@ -62,8 +62,8 @@ struct _Ximage_Info
|
|||
void *fmt1;
|
||||
void *fmtdef;
|
||||
} x11;
|
||||
int depth;
|
||||
int pool_mem;
|
||||
unsigned int depth;
|
||||
unsigned int pool_mem;
|
||||
Eina_List *pool;
|
||||
unsigned char can_do_shm;
|
||||
Xrender_Surface *mul;
|
||||
|
@ -122,7 +122,7 @@ struct _Xrender_Surface
|
|||
/* ximage support calls (ximage vs xshmimage, cache etc.) */
|
||||
Ximage_Info *_xr_xlib_image_info_get(Display *disp, Drawable draw, Visual *vis);
|
||||
void _xr_xlib_image_info_free(Ximage_Info *xinf);
|
||||
void _xr_xlib_image_info_pool_flush(Ximage_Info *xinf, int max_num, int max_mem);
|
||||
void _xr_xlib_image_info_pool_flush(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem);
|
||||
Ximage_Image *_xr_xlib_image_new(Ximage_Info *xinf, int w, int h, int depth);
|
||||
void _xr_xlib_image_free(Ximage_Image *xim);
|
||||
void _xr_xlib_image_put(Ximage_Image *xim, Drawable draw, int x, int y, int w, int h);
|
||||
|
@ -130,7 +130,7 @@ void _xr_xlib_image_put(Ximage_Image *xim, Drawable draw, int x, int y,
|
|||
#ifdef BUILD_ENGINE_XRENDER_XCB
|
||||
Ximage_Info *_xr_xcb_image_info_get(xcb_connection_t *conn, xcb_screen_t *screen, xcb_drawable_t draw, xcb_visualtype_t *visual);
|
||||
void _xr_xcb_image_info_free(Ximage_Info *xinf);
|
||||
void _xr_xcb_image_info_pool_flush(Ximage_Info *xinf, int max_num, int max_mem);
|
||||
void _xr_xcb_image_info_pool_flush(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem);
|
||||
Ximage_Image *_xr_xcb_image_new(Ximage_Info *xinf, int w, int h, int depth);
|
||||
void _xr_xcb_image_free(Ximage_Image *xim);
|
||||
void _xr_xcb_image_put(Ximage_Image *xim, xcb_drawable_t draw, int x, int y, int w, int h);
|
||||
|
|
|
@ -398,7 +398,7 @@ _xr_xcb_image_info_free(Ximage_Info *xinf)
|
|||
}
|
||||
|
||||
void
|
||||
_xr_xcb_image_info_pool_flush(Ximage_Info *xinf, int max_num, int max_mem)
|
||||
_xr_xcb_image_info_pool_flush(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem)
|
||||
{
|
||||
if ((xinf->pool_mem <= max_mem) && (eina_list_count(xinf->pool) <= max_num)) return;
|
||||
while ((xinf->pool_mem > max_mem) || (eina_list_count(xinf->pool) > max_num))
|
||||
|
|
|
@ -117,7 +117,7 @@ _xr_xlib_image_info_free(Ximage_Info *xinf)
|
|||
}
|
||||
|
||||
void
|
||||
_xr_xlib_image_info_pool_flush(Ximage_Info *xinf, int max_num, int max_mem)
|
||||
_xr_xlib_image_info_pool_flush(Ximage_Info *xinf, unsigned int max_num, unsigned int max_mem)
|
||||
{
|
||||
if ((xinf->pool_mem <= max_mem) && (eina_list_count(xinf->pool) <= max_num)) return;
|
||||
while ((xinf->pool_mem > max_mem) || (eina_list_count(xinf->pool) > max_num))
|
||||
|
|
|
@ -78,7 +78,7 @@ _JPEGErrorHandler2(j_common_ptr cinfo __UNUSED__, int msg_level __UNUSED__)
|
|||
static Eina_Bool
|
||||
evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
|
||||
{
|
||||
int w, h, scalew, scaleh;
|
||||
unsigned int w, h, scalew, scaleh;
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct _JPEG_error_mgr jerr;
|
||||
|
||||
|
@ -129,14 +129,14 @@ evas_image_load_file_head_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
|
|||
}
|
||||
else if ((ie->load_opts.w > 0) && (ie->load_opts.h > 0))
|
||||
{
|
||||
int w2 = w, h2 = h;
|
||||
unsigned int w2 = w, h2 = h;
|
||||
if (ie->load_opts.w > 0)
|
||||
{
|
||||
w2 = ie->load_opts.w;
|
||||
h2 = (ie->load_opts.w * h) / w;
|
||||
if ((ie->load_opts.h > 0) && (h2 > ie->load_opts.h))
|
||||
{
|
||||
int w3;
|
||||
unsigned int w3;
|
||||
h2 = ie->load_opts.h;
|
||||
w3 = (ie->load_opts.h * w) / h;
|
||||
if (w3 > w2)
|
||||
|
@ -226,12 +226,12 @@ get_time(void)
|
|||
static Eina_Bool
|
||||
evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
|
||||
{
|
||||
int w, h;
|
||||
unsigned int w, h;
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
struct _JPEG_error_mgr jerr;
|
||||
DATA8 *ptr, *line[16], *data;
|
||||
DATA32 *ptr2;
|
||||
int x, y, l, i, scans;
|
||||
unsigned int x, y, l, i, scans;
|
||||
int region = 0;
|
||||
|
||||
cinfo.err = jpeg_std_error(&(jerr.pub));
|
||||
|
@ -339,7 +339,7 @@ evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
|
|||
if (cinfo.output_components == 4)
|
||||
{
|
||||
// FIXME: handle region
|
||||
for (i = 0; i < cinfo.rec_outbuf_height; i++)
|
||||
for (i = 0; (int)i < cinfo.rec_outbuf_height; i++)
|
||||
line[i] = data + (i * w * 4);
|
||||
for (l = 0; l < h; l += cinfo.rec_outbuf_height)
|
||||
{
|
||||
|
@ -482,7 +482,7 @@ evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
|
|||
}
|
||||
t = get_time();
|
||||
*/
|
||||
for (i = 0; i < cinfo.rec_outbuf_height; i++)
|
||||
for (i = 0; (int)i < cinfo.rec_outbuf_height; i++)
|
||||
line[i] = data + (i * w * 3);
|
||||
for (l = 0; l < h; l += cinfo.rec_outbuf_height)
|
||||
{
|
||||
|
@ -547,7 +547,7 @@ evas_image_load_file_data_jpeg_internal(Image_Entry *ie, FILE *f, int *error)
|
|||
/* We finally handle RGB with 1 component */
|
||||
else if (cinfo.output_components == 1)
|
||||
{
|
||||
for (i = 0; i < cinfo.rec_outbuf_height; i++)
|
||||
for (i = 0; (int)i < cinfo.rec_outbuf_height; i++)
|
||||
line[i] = data + (i * w);
|
||||
for (l = 0; l < h; l += cinfo.rec_outbuf_height)
|
||||
{
|
||||
|
|
|
@ -104,13 +104,13 @@ evas_image_load_file_head_svg(Image_Entry *ie, const char *file, const char *key
|
|||
else if ((ie->load_opts.w > 0) &&
|
||||
(ie->load_opts.h > 0))
|
||||
{
|
||||
int w2, h2;
|
||||
unsigned int w2, h2;
|
||||
|
||||
w2 = ie->load_opts.w;
|
||||
h2 = (ie->load_opts.w * h) / w;
|
||||
if (h2 > ie->load_opts.h)
|
||||
{
|
||||
int w3;
|
||||
unsigned int w3;
|
||||
h2 = ie->load_opts.h;
|
||||
w3 = (ie->load_opts.h * w) / h;
|
||||
if (w3 > w2)
|
||||
|
@ -184,7 +184,7 @@ evas_image_load_file_data_svg(Image_Entry *ie, const char *file, const char *key
|
|||
else if ((ie->load_opts.w > 0) &&
|
||||
(ie->load_opts.h > 0))
|
||||
{
|
||||
int w2, h2;
|
||||
unsigned int w2, h2;
|
||||
|
||||
w2 = ie->load_opts.w;
|
||||
h2 = (ie->load_opts.w * h) / w;
|
||||
|
|
|
@ -58,7 +58,6 @@ save_image_jpeg(RGBA_Image *im, const char *file, int quality)
|
|||
DATA32 *ptr;
|
||||
JSAMPROW *jbuf;
|
||||
int y = 0;
|
||||
int i, j;
|
||||
|
||||
if (!im || !im->image.data || !file)
|
||||
return 0;
|
||||
|
@ -91,6 +90,7 @@ save_image_jpeg(RGBA_Image *im, const char *file, int quality)
|
|||
ptr = im->image.data;
|
||||
while (cinfo.next_scanline < cinfo.image_height)
|
||||
{
|
||||
unsigned int i, j;
|
||||
for (j = 0, i = 0; i < im->cache_entry.w; i++)
|
||||
{
|
||||
buf[j++] = ((*ptr) >> 16) & 0xff;
|
||||
|
|
|
@ -39,7 +39,7 @@ save_image_png(RGBA_Image *im, const char *file, int compress, int interlace)
|
|||
png_structp png_ptr;
|
||||
png_infop info_ptr;
|
||||
DATA32 *ptr, *data = NULL;
|
||||
int x, y, j;
|
||||
unsigned int x, y, j;
|
||||
png_bytep row_ptr, png_data = NULL;
|
||||
png_color_8 sig_bit;
|
||||
int num_passes = 1, pass;
|
||||
|
|
Loading…
Reference in New Issue