union {
struct {
void *visual;
- long pixmap;
+ unsigned long pixmap;
} x11;
struct { /* padding data for future use - have space for 8 pointers */
void *d[8];
if (!cserve) return NULL;
if (!server_send(cserve, 0, OP_GETINFO, 0, NULL)) return NULL;
rep = (Op_Getinfo_Reply *)server_read(cserve, 0, &opcode, &size);
- if ((rep) && (opcode == OP_GETINFO) && (size >= sizeof(Op_Getinfo_Reply)))
+ if ((rep) && (opcode == OP_GETINFO) &&
+ (size >= (int)sizeof(Op_Getinfo_Reply)))
{
return rep;
}
int *ints;
unsigned char *data, *newbuf;
- if (c->inbufsize < sizeof(int)) return 0;
+ if (c->inbufsize < (int)sizeof(int)) return 0;
ints = (int *)((c->inbuf));
if ((ints[0] < 0) || (ints[0] > (1024 * 1024)))
return 0;
- if (c->inbufsize < (ints[0] + (sizeof(int) * 3)))
+ if (c->inbufsize < (ints[0] + ((int)sizeof(int) * 3)))
{
return 0;
}
const char *loader = NULL;
Evas_Module *em;
char *dot;
- int i;
+ unsigned int i;
int ret = EVAS_LOAD_ERROR_NONE;
struct evas_image_foreach_loader_data fdata;
unsigned long long usage;
unsigned long long usage_count;
RGBA_Image *im, *parent_im;
- int src_x, src_y, src_w, src_h;
- int dst_w, dst_h;
- int flop;
- int size_adjust;
+ int src_x, src_y;
+ unsigned int src_w, src_h;
+ unsigned int dst_w, dst_h;
+ unsigned int flop;
+ unsigned int size_adjust;
#ifdef EVAS_FRAME_QUEUING
RWLK(lock);
#endif
static LK(cache_lock);
#endif
static Eina_Inlist *cache_list = NULL;
-static int cache_size = 0;
+static unsigned int cache_size = 0;
static int init = 0;
-static int max_cache_size = SCALE_CACHE_SIZE;
-static int max_dimension = MAX_SCALECACHE_DIM;
-static int max_flop_count = MAX_FLOP_COUNT;
-static int max_scale_items = MAX_SCALEITEMS;
-static int min_scale_uses = MIN_SCALE_USES;
+static unsigned int max_cache_size = SCALE_CACHE_SIZE;
+static unsigned int max_dimension = MAX_SCALECACHE_DIM;
+static unsigned int max_flop_count = MAX_FLOP_COUNT;
+static unsigned int max_scale_items = MAX_SCALEITEMS;
+static unsigned int min_scale_uses = MIN_SCALE_USES;
#endif
void
_sci_find(RGBA_Image *im,
RGBA_Draw_Context *dc __UNUSED__, int smooth,
int src_region_x, int src_region_y,
- int src_region_w, int src_region_h,
- int dst_region_w, int dst_region_h)
+ unsigned int src_region_w, unsigned int src_region_h,
+ unsigned int dst_region_w, unsigned int dst_region_h)
{
Eina_List *l;
Scaleitem *sci;
#endif
EAPI void
-evas_common_rgba_image_scalecache_size_set(int size)
+evas_common_rgba_image_scalecache_size_set(unsigned int size)
{
#ifdef SCALECACHE
LKL(cache_lock);
#endif
}
-EAPI int
+EAPI unsigned int
evas_common_rgba_image_scalecache_size_get(void)
{
#ifdef SCALECACHE
}
else
{
- if (sci->flop > 0) sci->flop -= FLOP_DEL;
+ if (sci->flop >= FLOP_DEL) sci->flop -= FLOP_DEL;
}
// INF("use cached!");
#ifdef EVAS_FRAME_QUEUING
#define IN_RANGE(x, y, w, h) \
-( ((unsigned)(x) < (w)) && ((unsigned)(y) < (h)) )
+ ( ((unsigned)(x) < (unsigned)(w)) && ((unsigned)(y) < (unsigned)(h)) )
-#define IN_RECT(x, y, rx, ry, rw, rh) \
-( ((unsigned)((x) - (rx)) < (rw)) && ((unsigned)((y) - (ry)) < (rh)) )
+#define IN_RECT(x, y, rx, ry, rw, rh) \
+( ((unsigned)((x) - (rx)) < (unsigned)(rw)) && \
+ ((unsigned)((y) - (ry)) < (unsigned)(rh)) )
#define EXCHANGE_POINTS(x0, y0, x1, y1) \
{ \
if ((py < -1) && (dely < 0)) return;
if ((py > by) && (dely > 0)) return;
}
- if ((unsigned)(px) < clw)
+ if ((px) < clw)
{
aa = ((yy - (y << 16)) >> 8);
- if ((unsigned)(py) < clh)
+ if ((py) < clh)
pfunc(0, 255 - aa, color, p);
- if ((unsigned)(py + 1) < clh)
+ if ((py + 1) < clh)
pfunc(0, aa, color, p + dstw);
}
yy += dyy;
if ((px < -1) && (delx < 0)) return;
if ((px > rx) && (delx > 0)) return;
}
- if ((unsigned)(py) < clh)
+ if ((py) < clh)
{
aa = ((xx - (x << 16)) >> 8);
- if ((unsigned)(px) < clw)
+ if ((px) < clw)
pfunc(0, 255 - aa, color, p);
- if ((unsigned)(px + 1) < clw)
+ if ((px + 1) < clw)
pfunc(0, aa, color, p + 1);
}
xx += dxx;
const DATA32 *sp;
DATA8 *dp;
DATA8 *ap;
- int y;
+ unsigned int y;
sp = src;
dp = im->pixels;
{
const DATA32 *sp;
DATA8 *dp;
- int y;
+ unsigned int y;
sp = src;
dp = im->pixels;
{
Evas_Module *em;
- if (type < 0 || type > 3) return EINA_FALSE;
+ if ((unsigned int)type > 3) return EINA_FALSE;
if (module->version != EVAS_MODULE_API_VERSION) return EINA_FALSE;
if (!module) return EINA_FALSE;
{
Evas_Module *em;
- if (type < 0 || type > 3) return EINA_FALSE;
+ if ((unsigned int)type > 3) return EINA_FALSE;
if (!module) return EINA_FALSE;
em = eina_hash_find(evas_modules[type], module->name);
Eina_Module *en;
Eina_List *l;
- if (type < 0 || type > 3) return NULL;
+ if ((unsigned int)type > 3) return NULL;
em = eina_hash_find(evas_modules[type], name);
if (em) return em;
Evas_Module *
evas_module_engine_get(int render_method)
{
- if (render_method <= 0 || render_method > eina_array_count_get(evas_engines))
+ if ((render_method <= 0) ||
+ ((unsigned int)render_method > eina_array_count_get(evas_engines)))
return NULL;
return eina_array_data_get(evas_engines, render_method - 1);
}
#define pld(addr, off)
#endif /* __ARMEL__ */
-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;
}
Outbuf_Depth depth;
void *dest;
- int dest_row_bytes;
+ unsigned int dest_row_bytes;
int alpha_level;
DATA32 color_key;
fprintf(stderr, "renderer: %s\n", renderer);
fprintf(stderr, "version: %s\n", version);
}
- if (strstr(vendor, "NVIDIA"))
+ if (strstr((const char*)vendor, "NVIDIA"))
// FIXME: also same as tegra2 - maybe check renderer too
//
// vendor: NVIDIA Corporation
depth, NULL, ~0, NULL);
if (xob->xim)
{
- xob->shm_info->shmid = shmget(IPC_PRIVATE,
- xob->xim->size,
- IPC_CREAT | 0777);
+ int shmid = shmget
+ (IPC_PRIVATE, xob->xim->size, IPC_CREAT | 0777);
- if (xob->shm_info->shmid >= 0)
+ if (shmid >= 0)
{
+ xob->shm_info->shmid = shmid;
xob->shm_info->shmaddr = xob->xim->data =
shmat(xob->shm_info->shmid, 0, 0);
static Eina_List *shmpool = NULL;
static int shmsize = 0;
static int shmmemlimit = 10 * 1024 * 1024;
-static int shmcountlimit = 32;
+static const unsigned int shmcountlimit = 32;
#ifdef EVAS_FRAME_QUEUING
static LK(lock_shmpool);
buf->priv.mask.r,
buf->priv.mask.g,
buf->priv.mask.b,
- buf->priv.pal ? buf->priv.pal->colors : -1);
+ buf->priv.pal ? (int)buf->priv.pal->colors : -1);
}
}
evas_software_xlib_outbuf_drawable_set(buf, draw);
if ((dc) && (dc->mul.use))
{
- int r, g, b, a;
+ unsigned int r, g, b, a;
if ((op == PictOpOver) && (!dc->mul.col)) return;
a = dc->mul.col >> 24;
raster(TIFFRGBAImage_Extra * img, uint32 * rast,
uint32 x, uint32 y, uint32 w, uint32 h)
{
- int image_width, image_height;
+ unsigned int image_width, image_height;
uint32 *pixel, pixel_value;
- int i, j, dy, rast_offset;
+ int i, dy, rast_offset;
DATA32 *buffer_pixel, *buffer = evas_cache_image_pixels(img->image);
int alpha_premult = 0;
image_width = img->image->w;
image_height = img->image->h;
- dy = h > y ? -1 : y - h;
+ dy = h > y ? -1 : ((int)y - (int)h);
/* rast seems to point to the beginning of the last strip processed */
/* so you need use negative offsets. Bizzare. Someone please check this */
alpha_premult = 1;
for (i = y, rast_offset = 0; i > dy; i--, rast_offset--)
{
+ unsigned int j;
+
pixel = rast + (rast_offset * image_width);
buffer_pixel = buffer + ((((image_height - 1) - i) * image_width) + x);
for (j = 0; j < w; j++)
{
- int a, r, g, b;
+ unsigned int a, r, g, b;
pixel_value = (*(pixel++));
a = TIFFGetA(pixel_value);
if (!tl) break;
line = tl;
}
- if (((ptr) && ((ptr - evas_cache_image_pixels(ie)) >= (w * h * sizeof(DATA32)))) ||
+ if (((ptr) && ((ptr - evas_cache_image_pixels(ie)) >= (w * h * (int)sizeof(DATA32)))) ||
((context > 1) && (count >= pixels)))
break;
}