Ipc_Data_Update *ipc;
int n = e->response;
- /* b->lockfd is not enough to ensure the size is same
+ /* b->lockfd is not enough to ensure the size is same
* between what server knows, and client knows.
* So should check file lock also. */
if ((n >= 0) && (n < NBUF))
if (b->file) shm_unlink(b->file);
if (b->lock) unlink(b->lock);
}
-
+
if (b->addr != MAP_FAILED) munmap(b->addr, b->size);
if (b->fd >= 0) close(b->fd);
if (b->lockfd >= 0) close(b->lockfd);
ecore_evas_geometry_get(ee, &canvas_x, &canvas_y, NULL, NULL);
}
- EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "canvas (x: %d, y: %d)",
+ EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "canvas (x: %d, y: %d)",
canvas_x, canvas_y);
if (imcontext->text_input)
{
Ecore_IMF_Preedit_Attr *attr;
- if ((imcontext->serial - serial) >
+ if ((imcontext->serial - serial) >
(imcontext->serial - imcontext->reset_serial))
{
EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom,
text,
imcontext->preedit_text ? imcontext->preedit_text : "");
- old_preedit =
+ old_preedit =
imcontext->preedit_text && strlen(imcontext->preedit_text) > 0;
if (!imcontext->ctx)
if (old_preedit)
{
- ecore_imf_context_event_callback_call(imcontext->ctx,
+ ecore_imf_context_event_callback_call(imcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_END,
NULL);
}
if (imcontext->pending_commit.delete_length > 0)
{
/* cursor_pos is a byte index */
- if (ecore_imf_context_surrounding_get(imcontext->ctx, &surrounding,
+ if (ecore_imf_context_surrounding_get(imcontext->ctx, &surrounding,
&cursor_pos))
{
ev.ctx = imcontext->ctx;
ecore_imf_context_event_callback_call(imcontext->ctx,
ECORE_IMF_CALLBACK_PREEDIT_END, NULL);
- ecore_imf_context_event_callback_call(imcontext->ctx,
- ECORE_IMF_CALLBACK_COMMIT,
+ ecore_imf_context_event_callback_call(imcontext->ctx,
+ ECORE_IMF_CALLBACK_COMMIT,
(void *)imcontext->preedit_commit);
}
if (!check_serial(imcontext, serial))
return;
- old_preedit =
+ old_preedit =
imcontext->preedit_text && strlen(imcontext->preedit_text) > 0;
clear_preedit(imcontext);
imcontext->preedit_text = strdup(text);
imcontext->preedit_commit = strdup(commit);
- imcontext->preedit_cursor =
+ imcontext->preedit_cursor =
utf8_offset_to_characters(text, imcontext->pending_preedit.cursor);
imcontext->preedit_attrs = imcontext->pending_preedit.attrs;
if (!old_preedit)
{
- ecore_imf_context_event_callback_call(imcontext->ctx,
- ECORE_IMF_CALLBACK_PREEDIT_START,
+ ecore_imf_context_event_callback_call(imcontext->ctx,
+ ECORE_IMF_CALLBACK_PREEDIT_START,
NULL);
}
- ecore_imf_context_event_callback_call(imcontext->ctx,
- ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
+ ecore_imf_context_event_callback_call(imcontext->ctx,
+ ECORE_IMF_CALLBACK_PREEDIT_CHANGED,
NULL);
if (imcontext->preedit_text && strlen(imcontext->preedit_text) == 0)
{
- ecore_imf_context_event_callback_call(imcontext->ctx,
- ECORE_IMF_CALLBACK_PREEDIT_END,
+ ecore_imf_context_event_callback_call(imcontext->ctx,
+ ECORE_IMF_CALLBACK_PREEDIT_END,
NULL);
}
}
attr->start_index = index;
attr->end_index = index + length;
- imcontext->pending_preedit.attrs =
+ imcontext->pending_preedit.attrs =
eina_list_append(imcontext->pending_preedit.attrs, attr);
}
imcontext->ctx = ctx;
- imcontext->text_input =
+ imcontext->text_input =
zwp_text_input_manager_v1_create_text_input(imcontext->text_input_manager);
if (imcontext->text_input)
- zwp_text_input_v1_add_listener(imcontext->text_input,
+ zwp_text_input_v1_add_listener(imcontext->text_input,
&text_input_listener, imcontext);
}
{
const char *s;
- _ecore_imf_wayland_log_dom =
+ _ecore_imf_wayland_log_dom =
eina_log_domain_register("ecore_imf_wayland", EINA_COLOR_YELLOW);
if (!getenv("WAYLAND_DISPLAY")) return EINA_FALSE;
ewd = ecore_wl2_display_connect(NULL);
if (!ewd) goto err;
- ecore_imf_module_register(&wayland_im_info, im_module_create,
+ ecore_imf_module_register(&wayland_im_info, im_module_create,
im_module_exit);
EINA_LOG_DOM_INFO(_ecore_imf_wayland_log_dom, "im module initialized");
{
#ifdef DEBUG
void *pmem;
-
+
// pool mem base
pmem = (void *)(((unsigned char *)p) + sizeof(Chained_Pool));
// mempool is cleaning up the mess created. be quiet for now as we were before
// but edje seems to be a big offender at the moment! bad cedric! :)
// WRN(
-// "Pool [%s] over by %i. cleaning up for you",
+// "Pool [%s] over by %i. cleaning up for you",
// pool->name, pool->over);
while (pool->over_list)
{
if (pool->over > 0)
{
WRN(
- "Pool [%s] still over by %i\n",
+ "Pool [%s] still over by %i\n",
pool->name, pool->over);
}
static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE("sink",
GST_PAD_SINK, GST_PAD_ALWAYS,
- GST_STATIC_CAPS(GST_VIDEO_CAPS_MAKE("{ I420, YV12, YUY2, NV12, BGRx, BGR, BGRA }")));
+ GST_STATIC_CAPS(GST_VIDEO_CAPS_MAKE("{ I420, YV12, YUY2, NV12, BGRx, BGR, BGRA }")));
GST_DEBUG_CATEGORY_STATIC(emotion_video_sink_debug);
#define GST_CAT_DEFAULT emotion_video_sink_debug
_plugin->first = EINA_TRUE;
if ((pos <= 0) || (pos >= 1))
- _plugin->pi = (0.1 * _plugin->len) +
+ _plugin->pi = (0.1 * _plugin->len) +
(_plugin->pcount * _plugin->len * interval);
else
- _plugin->pi = (pos * _plugin->len) +
+ _plugin->pi = (pos * _plugin->len) +
(_plugin->pcount * _plugin->len * interval);
emotion_object_position_set(_plugin->video, _plugin->pi);
if (!buf->priv.back_buf)
{
Gfx_Func_Copy func;
-
+
func = evas_common_draw_func_copy_get(w, 0);
if (func)
{
dst = (DATA32 *)((DATA8 *)(buf->dest) + ((y + yy) * row_bytes));
func(src, dst, w);
}
-
+
}
}
if (buf->func.free_update_region)
DATA32 *src, *dst;
DATA8 *dest;
int xx, yy, row_bytes;
-
+
row_bytes = buf->dest_row_bytes;
dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4);
if (buf->func.new_update_region)
DATA32 *src, *dst;
DATA8 *dest;
int xx, yy, row_bytes;
-
+
row_bytes = buf->dest_row_bytes;
dest = (DATA8 *)(buf->dest) + (y * row_bytes) + (x * 4);
if (buf->func.new_update_region)
if ((ob->rotation == 0) || (ob->rotation == 180))
{
- func =
- evas_common_convert_func_get(0, w, h, ob->bpp,
+ func =
+ evas_common_convert_func_get(0, w, h, ob->bpp,
RED_MASK, GREEN_MASK, BLUE_MASK,
PAL_MODE_NONE, ob->rotation);
}
else if ((ob->rotation == 90) || (ob->rotation == 270))
{
- func =
- evas_common_convert_func_get(0, h, w, ob->bpp,
+ func =
+ evas_common_convert_func_get(0, h, w, ob->bpp,
RED_MASK, GREEN_MASK, BLUE_MASK,
PAL_MODE_NONE, ob->rotation);
}
if (ob->rotation == 0)
{
- RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.w, rect.h,
+ RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.w, rect.h,
0, 0, bw, bh);
dst += (bpl * rect.y) + (rect.x * bpp);
w -= rx;
else if (ob->rotation == 180)
{
pr = rect;
- RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.w, rect.h,
+ RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.w, rect.h,
0, 0, bw, bh);
rx = pr.w - rect.w;
ry = pr.h - rect.h;
else if (ob->rotation == 90)
{
pr = rect;
- RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.w, rect.h,
+ RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.w, rect.h,
0, 0, bw, bh);
rx = pr.w - rect.w; ry = pr.h - rect.h;
src += ry;
else if (ob->rotation == 270)
{
pr = rect;
- RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.w, rect.h,
+ RECTS_CLIP_TO_RECT(rect.x, rect.y, rect.w, rect.h,
0, 0, bw, bh);
rx = pr.w - rect.w; ry = pr.h - rect.h;
src += (update->cache_entry.w * rx);
fb_init_palette_332(FB_Mode *mode)
{
int r, g, b, i;
-
+
if (mode->fb_var.bits_per_pixel != 8)
return;
i = 0;
-
+
if (ioctl(fb, FBIOGETCMAP, &cmap) == -1)
ERR("could not get colormap: ioctl(%d, FBIOGETCMAP) = %s",
fb, strerror(errno));
-
+
/* generate the palette */
for (r = 0; r < 8; r++)
{
for (b = 0; b < 4; b++)
{
int val;
-
+
val = (r << 5) | (r << 2) | (r >> 1);
red[i] = (val << 8) | val;
val = (g << 5) | (g << 2) | (g >> 1);
}
}
}
-
+
/* set colormap */
if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1)
{
fb_init_palette_linear(FB_Mode *mode)
{
int i;
-
+
if (mode->fb_var.bits_per_pixel != 8)
return;
-
+
if (ioctl(fb, FBIOGETCMAP, &cmap) == -1)
ERR("could not get colormap: ioctl(%d, FBIOGETCMAP) = %s",
fb, strerror(errno));
-
+
/* generate the palette */
for (i = 0; i < 256; i++)
red[i] = (i << 8) | i;
green[i] = (i << 8) | i;
for (i = 0; i < 256; i++)
blue[i] = (i << 8) | i;
-
+
/* set colormap */
if (ioctl(fb, FBIOPUTCMAP, &cmap) == -1)
perror("ioctl FBIOPUTCMAP");
char line[256], label[256], value[256];
FB_Mode *modes = NULL, *temp;
int num;
-
+
num = 0;
f = fopen("/etc/fb.modes","rb");
if (!f)
if (sscanf(line, "mode \"%250[^\"]\"", label) == 1)
{
char f1[32], f2[32], f3[32], f4[32];
-
+
f1[0] = 0; f2[0] = 0; f3[0] = 0; f4[0] = 0;
sscanf(label, "%30[^x]x%30[^-]-%30[^-]-%30s", f1, f2, f3, f4);
if ((f1[0]) && (f2[0]))
{
int geometry = 0;
int timings = 0;
-
+
num++;
temp = modes;
modes = realloc(modes, num * sizeof(FB_Mode));
while ((fgets(line, sizeof(line) - 1, f)) &&
(!strstr(line, "endmode")))
{
-
+
if (sscanf(line," geometry %i %i %i %i %i",
&modes[num - 1].fb_var.xres,
&modes[num - 1].fb_var.yres,
{
FB_Mode *modes;
unsigned int i, num_modes;
-
+
modes = fb_list_modes(&num_modes);
DBG("want %ux%u, bitdepth=%u, refresh=%u, modes=%p, num_modes=%u",
width, height, pdepth, refresh, modes, num_modes);
{
FB_Mode *modes;
unsigned int i, num_modes;
-
+
modes = fb_list_modes(&num_modes);
DBG("want %ux%u, bitdepth=%u, refresh=%u, modes=%p, num_modes=%u",
width, height, cur_mode->depth, refresh, modes, num_modes);
{
FB_Mode *modes;
unsigned int i, num_modes;
-
+
modes = fb_list_modes(&num_modes);
DBG("want %ux%u, bitdepth=%u, refresh=%u, modes=%p, num_modes=%u",
width, height, pdepth, refresh, modes, num_modes);
{
FB_Mode *mode = NULL;
int hpix, lines, clockrate;
-
+
mode = malloc(sizeof(FB_Mode));
/* look what we have now ... */
-
+
if (ioctl(fb, FBIOGET_VSCREENINFO, &mode->fb_var) == -1)
{
ERR("could not get screeninfo: ioctl(%d, FBIOGET_VSCREENINFO) = %s",
struct vt_stat vts;
char vtname[32];
int vtfd;
-
+
if (vtno < 0)
{
if ((ioctl(tty,VT_OPENQRY, &vtno) == -1))
return;
}
vtfd = open(vtname,O_RDWR);
-
+
if (ioctl(tty, VT_GETSTATE, &vts) == -1)
{
perror("ioctl VT_GETSTATE");
close(vtfd);
return;
}
-
+
orig_vt_no = vts.v_active;
close(vtfd);
#if 0
return;
}
DBG("opened fb=%d (%s)", fb, dev);
-
+
if (ioctl(fb, FBIOGET_VSCREENINFO, &fb_ovar) == -1)
{
ERR("could not get screeninfo: ioctl(%d, FBIOGET_VSCREENINFO) = %s",
fb_cleanup();
return -1;
}
-
+
if (fb_fix.type != FB_TYPE_PACKED_PIXELS)
{
CRI("can handle only packed pixel frame buffers (want %#x, got %#x)",
{
mode->fb_var.xoffset = 0;
mode->fb_var.yoffset = 0;
-
+
if (ioctl(fb, FBIOPAN_DISPLAY, &(mode->fb_var)) == -1)
{
const char *errmsg = strerror(errno);
"mode=%hhd, waitv=%hhd, relsig=%hd, acqsig=%hd, frsig=%hd}) = %s",
tty, vt_omode.mode, vt_omode.waitv, vt_omode.relsig,
vt_omode.acqsig, vt_omode.frsig, strerror(errno));
-#if 0
+#if 0
if ((ioctl(tty, VT_ACTIVATE, orig_vt_no) == -1) && (orig_vt_no))
ERR("could not activate: ioctl(%d, VT_ACTIVATE, %d) = %s",
tty, orig_vt_no, strerror(errno));
-#endif
+#endif
if (tty > 0) /* don't close if got from isatty(0) */
close(tty);
}
buf->priv.mask.b, PAL_MODE_NONE,
buf->rot);
}
- else if (buf->rot == 180)
+ else if (buf->rot == 180)
{
data = (DATA8 *)buf->priv.fb.fb->mem +
buf->priv.fb.fb->mem_offset +
- buf->priv.fb.fb->bpp *
+ buf->priv.fb.fb->bpp *
(buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->stride));
conv_func = evas_common_convert_func_get(data, w, h,
buf->priv.fb.fb->fb_var.bits_per_pixel,
FINDSYM(glsym_glStartTiling, "glActivateTileQCOM", NULL, glsym_func_void);
FINDSYM(glsym_glEndTiling, "glEndTilingQCOM", "GL_QCOM_tiled_rendering", glsym_func_void);
FINDSYM(glsym_glEndTiling, "glEndTiling", NULL, glsym_func_void);
-
+
if (!getenv("EVAS_GL_MAPBUFFER_DISABLE"))
{
// Not sure there's an EXT variant. (probably no KHR variant)
(tex->im->orient == EVAS_IMAGE_ORIENT_90))
{
double tmp;
-
+
SWAP(&sw, &sh, tmp);
SWAP(&sx, &sy, tmp);
SWAP(&sw, &sh, tmp);
SWAP(&sx, &sy, tmp);
-
+
sx = tex->im->w - sw - sx;
sy = tex->im->h - sh - sy;
}
}
PUSH_MASK(pn, mtex, mx, my, mw, mh, masksam);
-
+
if (!nomul)
PUSH_6_COLORS(pn, r, g, b, a);
}
Eina_List *surfaces;
Eina_List *contexts;
- //void *engine_data;
+ //void *engine_data;
Eina_Hash *safe_extensions;
// Force off render threading // TIZEN_ONLY(20171114) : EvasGL Render Thread
// expand to 32bit (4 byte) aligned rows for texture upload
nw = ((w + 3) / 4) * 4;
- // if image already (4 byte) aligned rows then assign old image data to new data(ndata) to
+ // if image already (4 byte) aligned rows then assign old image data to new data(ndata) to
if(nw == w){
ndata = data;
} else {
{
async->tex->was_preloaded = EINA_TRUE;
- async->tex->ptt->allocations =
+ async->tex->ptt->allocations =
eina_list_remove(async->tex->ptt->allocations,
async->tex->aptt);
eina_rectangle_pool_release(async->tex->aptt);
eina_condition_signal(&async_loader_cond);
eina_condition_wait(&async_loader_cond);
- if (async_loader_exit)
+ if (async_loader_exit)
{
eina_lock_release(&async_loader_lock);
return EINA_FALSE;
#ifdef GL_TEXTURE_INTERNAL_FORMAT
# ifdef GL_GLES
# else
-// this is not in opengles!!! hrrrm
+// this is not in opengles!!! hrrrm
// if (GL_TH(glGetTexLevelParameteriv)) // in case of weak symbols?
{
int intfmtret = -1;
tex->ptv2 = NULL;
tex->ptuv = NULL;
- if (tex->im)
+ if (tex->im)
{
tex->im->tex = NULL;
if (tex->im->im) tex->im->im->cache_entry.flags.textured = 0;
else if (rows[0] && rows[h])
{
unsigned int y;
-
+
GL_TH(glPixelStorei, GL_UNPACK_ALIGNMENT, 1);
GL_TH(glBindTexture, GL_TEXTURE_2D, tex->pt->texture);
if (!_tex_2d(tex->gc, tex->pt->intformat, w, h, tex->pt->format, tex->pt->dataformat, NULL))
struct gbm_surface *surface;
- struct
+ struct
{
EGLContext context;
EGLSurface surface;
EGLDisplay disp;
} egl;
- struct
+ struct
{
Ecore_Drm2_Output *output;
Ecore_Drm2_Plane *plane;
if (!slice || !im) return ret;
- /* If content hint is DYNAMIC, the im->im could be NULL. If the im->im does
+ /* If content hint is DYNAMIC, the im->im could be NULL. If the im->im does
not exist, eng_image_data_direct_get needs to return copied dyn.data to
make functions including efl_file_save work. */
if ((im->content_hint == EVAS_IMAGE_CONTENT_HINT_DYNAMIC) &&
return EINA_TRUE;
}
-static int
+static int
eng_image_animated_frame_get(void *engine EINA_UNUSED, void *image)
{
Evas_GL_Image *gim = image;
}
if (context == EGL_NO_CONTEXT)
_tls_context_set(gw->egl_context);
-
+
SET_RESTORE_CONTEXT();
if (evas_eglMakeCurrent(gw->egl_disp,
gw->egl_surface,
return EINA_TRUE;
}
-static int
+static int
eng_image_animated_frame_get(void *data EINA_UNUSED, void *image)
{
Image_Entry *im;
Evas_Engine_Info magic;
/* engine specific data & parameters it needs to set up */
- struct
+ struct
{
Evas_Engine_Info_Software_X11_Backend backend;
int rot;
int onebuf;
- struct
+ struct
{
Convert_Pal *pal;
- union
+ union
{
- struct
+ struct
{
Display *disp;
Window win;
unsigned char bit_swap : 1;
} xlib;
} x11;
- struct
+ struct
{
DATA32 r, g, b;
} mask;
/* 1 big buffer for updates - flush on idle_flush */
RGBA_Image *onebuf;
Eina_Array onebuf_regions;
-
+
void *swapper;
/* a list of pending regions to write to the target */
void eng_gl_symbols(EGLDisplay disp);
-static inline int
+static inline int
_re_wincheck(Outbuf *ob)
{
if (ob->surf) return 1;
free(gw);
}
-void
+void
eng_window_use(Outbuf *gw)
{
Eina_Bool force = EINA_FALSE;
}
}
-void
+void
eng_window_unsurf(Outbuf *gw)
{
if (!gw->surf) return;
gw->surf = EINA_FALSE;
}
-void
+void
eng_window_resurf(Outbuf *gw)
{
struct wl_surface *wls;
gw->surf = EINA_TRUE;
}
-void
+void
eng_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth EINA_UNUSED)
{
ob->w = w;
}
}
-int
+int
eng_outbuf_rotation_get(Outbuf *ob)
{
return ob->rot;
return ob->swap_mode;
}
-Eina_Bool
+Eina_Bool
eng_outbuf_region_first_rect(Outbuf *ob)
{
glsym_evas_gl_preload_render_lock(eng_preload_make_current, ob);
return ob->gl_context->def_surface;
}
-void
+void
eng_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update EINA_UNUSED, int x EINA_UNUSED, int y EINA_UNUSED, int w EINA_UNUSED, int h EINA_UNUSED)
{
if (!_re_wincheck(ob)) return;
glsym_evas_gl_common_context_flush(ob->gl_context);
}
-void
+void
eng_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_damage EINA_UNUSED, Evas_Render_Mode render_mode)
{
if (render_mode == EVAS_RENDER_MODE_ASYNC_INIT) goto end;
if (!(ctx = calloc(1, sizeof(Context_3D)))) return NULL;
- ctx->context =
+ ctx->context =
GL_TH(eglCreateContext, ob->egl_disp, ob->egl_config, ob->egl_context, attrs);
if (!ctx->context)
{
return NULL;
}
-void
+void
eng_gl_context_free(Context_3D *ctx)
{
eglDestroyContext(ctx->display, ctx->context);
free(ctx);
}
-void
+void
eng_gl_context_use(Context_3D *ctx)
{
SET_RESTORE_CONTEXT();
}
}
-static Evas_Module_Api evas_modapi =
+static Evas_Module_Api evas_modapi =
{
EVAS_MODULE_API_VERSION, "wayland_shm", "none", {module_open, module_close}
};
return NULL;
}
-void
+void
_evas_outbuf_free(Outbuf *ob)
{
LOGFN;
Eina_Rectangle *rect;
img = ob->priv.pending_writes->data;
- ob->priv.pending_writes =
+ ob->priv.pending_writes =
eina_list_remove_list(ob->priv.pending_writes, ob->priv.pending_writes);
rect = img->extended_info;
free(ob);
}
-void
+void
_evas_outbuf_idle_flush(Outbuf *ob)
{
RGBA_Image *img;
while (ob->priv.prev_pending_writes)
{
img = ob->priv.prev_pending_writes->data;
- ob->priv.prev_pending_writes =
- eina_list_remove_list(ob->priv.prev_pending_writes,
+ ob->priv.prev_pending_writes =
+ eina_list_remove_list(ob->priv.prev_pending_writes,
ob->priv.prev_pending_writes);
rect = img->extended_info;
evas_cache_image_drop(&img->cache_entry);
}
}
-void
+void
_evas_outbuf_flush(Outbuf *ob, Tilebuf_Rect *surface_damage EINA_UNUSED, Tilebuf_Rect *buffer_damage EINA_UNUSED, Evas_Render_Mode render_mode)
{
Eina_Rectangle *result;
//
}
-int
+int
_evas_outbuf_rotation_get(Outbuf *ob)
{
LOGFN;
return ob->rotation;
}
-void
+void
_evas_outbuf_reconfigure(Outbuf *ob, int w, int h, int rot, Outbuf_Depth depth, Eina_Bool alpha, Eina_Bool resize)
{
LOGFN;
- if ((depth == OUTBUF_DEPTH_NONE) ||
+ if ((depth == OUTBUF_DEPTH_NONE) ||
(depth == OUTBUF_DEPTH_INHERIT))
depth = ob->depth;
if ((ob->w == w) && (ob->h == h) &&
- (ob->rotation == rot) && (ob->depth == depth) &&
+ (ob->rotation == rot) && (ob->depth == depth) &&
(ob->priv.destination_alpha == alpha))
return;
img->extended_info = rect;
- ob->priv.pending_writes =
+ ob->priv.pending_writes =
eina_list_append(ob->priv.pending_writes, img);
if (cx) *cx = 0;
return NULL;
}
-void
+void
_evas_outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, int w, int h)
{
Gfx_Func_Convert func = NULL;
if ((ob->rotation == 0) || (ob->rotation == 180))
{
- func =
- evas_common_convert_func_get(0, w, h, depth,
+ func =
+ evas_common_convert_func_get(0, w, h, depth,
RED_MASK, GREEN_MASK, BLUE_MASK,
PAL_MODE_NONE, ob->rotation);
}
else if ((ob->rotation == 90) || (ob->rotation == 270))
{
- func =
- evas_common_convert_func_get(0, h, w, depth,
+ func =
+ evas_common_convert_func_get(0, h, w, depth,
RED_MASK, GREEN_MASK, BLUE_MASK,
PAL_MODE_NONE, ob->rotation);
}
header.height = load_opts->emile.region.h;
}
- /* It is not bad idea that bmp loader support scale down decoding
+ /* It is not bad idea that bmp loader support scale down decoding
* because of memory issue in mobile world.*/
if (load_opts->emile.scale_down_by > 1)
{
header.width = opts->emile.region.w;
header.height = opts->emile.region.h;
}
- /* It is not bad idea that bmp loader support scale down decoding
+ /* It is not bad idea that bmp loader support scale down decoding
* because of memory issue in mobile world. */
if (opts->emile.scale_down_by > 1)
scale_ratio = opts->emile.scale_down_by;
}
}
}
- else if ((header.bit_count == 16) &&
+ else if ((header.bit_count == 16) &&
(header.rmask == 0x7c00) && (header.gmask == 0x03e0) && (header.bmask == 0x001f)
)
{
{
int x, y, w, h;
unsigned short delay; // delay time in 1/100ths of a sec
- short transparent : 10; // -1 == not, anything else == index
+ short transparent : 10; // -1 == not, anything else == index
short dispose : 6; // 0, 1, 2, 3 (others invalid)
Eina_Bool interlace : 1; // interlaced or not
};
{
int xx, yy;
DATA32 *p;
-
+
for (yy = 0; yy < h; yy++)
{
p = data + ((y + yy) * rowpix) + x;
if (!l) l = animated->frames;
}
}
-
+
static int
_file_read(GifFileType *gft, GifByteType *buf, int len)
{
File_Info *fi = gft->UserData;
if (fi->pos >= fi->len) return 0; // if at or past end - no
- if ((fi->pos + len) >= fi->len) len = fi->len - fi->pos;
+ if ((fi->pos + len) >= fi->len) len = fi->len - fi->pos;
memcpy(buf, fi->map + fi->pos, len);
fi->pos += len;
return len;
// so we have to load multiple times to animate. what if the
// same image is shared/loaded in 2 ore more places AND animated
// there?
-
+
// use index stored in image (XXX: yuk!)
index = animated->cur_frame;
// if index is invalid for animated image - error out
{
int ext_code;
GifByteType *ext;
-
+
ext = NULL;
DGifGetExtension(gif, &ext_code, &ext);
while (ext)
else if (finfo->dispose == 3) // GIF_DISPOSE_RESTORE
{
Image_Entry_Frame *prevframe2;
-
+
// we need to copy data from one frame back
// from the prev frame into the current frame
// (copy the whole image - at least the sample
}
// if we hve a frame BUT the image is not animated... different
// path
- else if ((thisframe) && (!thisframe->data) &&
+ else if ((thisframe) && (!thisframe->data) &&
(!animated->animated))
{
// if we don't have the data decoded yet - decode it
loader->fi.map = NULL;
loader->imgnum = 0;
}
-
-on_ok:
+
+on_ok:
// no errors in header scan etc. so set err and return value
*error = EVAS_LOAD_ERROR_NONE;
ret = EINA_TRUE;
-
+
// if it was an animated image we need to copy the data to the
// pixels for the image from the frame holding the data
if (animated->animated && frame->data)
memcpy(pixels, frame->data, prop->w * prop->h * sizeof(DATA32));
prop->premul = EINA_TRUE;
-
+
on_error: // jump here on any errors to clean up
return ret;
}
if (!animated->animated) return -1.0;
if ((start_frame + frame_num) > animated->frame_count) return -1.0;
if (frame_num < 0) return -1.0;
-
+
if (frame_num < 1) frame_num = 1;
// walk frames from start frame though and total up delays
for (i = start_frame; i < (start_frame + frame_num); i++)
{
Frame_Info *finfo;
-
+
// find the frame
frame = _find_frame(animated, i);
// no frame? barf - bad file or i/o?
// NULL == highest res
// biggest == highest res
// smallest == lowest res
- //
+ //
// smaller == next size SMALLER than load opts WxH (if possible)
// bigger == next size BIGGER than load opts WxH (if possible)
// more ?
DATA8 lastc;
/* first skip all white space
- * Note: we are skipping here actually every character than is not
+ * Note: we are skipping here actually every character than is not
* a digit */
while (!isdigit(*b->current))
{
pmaps_buffer_plain_bw_get(Pmaps_Buffer *b, DATA32 *val)
{
/* first skip all white space
- * Note: we are skipping here actually every character than is not
+ * Note: we are skipping here actually every character than is not
* a digit */
while (!isdigit(*b->current))
{
static unsigned int
read_compressed_channel(const unsigned char *map, size_t length, size_t *position,
- const unsigned int channel_length EINA_UNUSED,
+ const unsigned int channel_length EINA_UNUSED,
unsigned int size,
unsigned char* channel)
{
uint32 *ps, pixel;
unsigned int a, r, g, b;
unsigned int nas = 0;
-
+
pix = pixels;
pd = pix + ((prop->h - y - 1) * prop->w);
ps = rast + (y * prop->w);
return 0;
}
-static int
+static int
evas_image_save_file_png(RGBA_Image *im, const char *file, const char *key EINA_UNUSED,
int quality EINA_UNUSED, int do_compress, const char *encoding EINA_UNUSED)
{
/* By default uses patent-free use COMPRESSION_DEFLATE,
* another lossless compression technique */
TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE);
-
+
if (has_alpha)
{
uint16 extras[] = { EXTRASAMPLE_ASSOCALPHA };
{
if (parent == NULL)
return;
- // inherit the property of parent if not present in child.
+ // inherit the property of parent if not present in child.
// fill
if (!(child->fill.flags & SVG_FILL_FLAGS_PAINT))
{