From 0af42ce86bf04c6456afedec9e703e0e645f6cda Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Sun, 28 Sep 2014 20:20:44 +0900 Subject: [PATCH] Update damaged region handling code. [model] Redwood,Kiran,B3(Wearable) [binary_type] AP [customer] Docomo/Orange/ATT/Open [issue#] N/A [problem] [cause] [solution] [team] HomeTF [request] [horizontal_expansion] Change-Id: Id9ccac6b79559ae8f383afba91430bafa216ccb0 --- include/instance.h | 6 +++--- src/instance.c | 18 +++++++++--------- src/script_handler.c | 5 ++--- src/server.c | 19 ++++++++++++------- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/include/instance.h b/include/instance.h index 4ffbd70..51b0240 100644 --- a/include/instance.h +++ b/include/instance.h @@ -222,9 +222,9 @@ extern int instance_dbox_update_end(struct inst_info *inst); extern int instance_gbar_update_begin(struct inst_info *inst); extern int instance_gbar_update_end(struct inst_info *inst); -extern void instance_gbar_updated(const char *pkgname, const char *id, const char *descfile); -extern void instance_dbox_updated_by_instance(struct inst_info *inst, const char *safe_file); -extern void instance_gbar_updated_by_instance(struct inst_info *inst, const char *descfile); +extern void instance_gbar_updated(const char *pkgname, const char *id, const char *descfile, int x, int y, int w, int h); +extern void instance_dbox_updated_by_instance(struct inst_info *inst, const char *safe_file, int x, int y, int w, int h); +extern void instance_gbar_updated_by_instance(struct inst_info *inst, const char *descfile, int x, int y, int w, int h); extern void instance_extra_info_updated_by_instance(struct inst_info *inst); /*! diff --git a/src/instance.c b/src/instance.c index 4367fc0..55a053e 100644 --- a/src/instance.c +++ b/src/instance.c @@ -1843,7 +1843,7 @@ HAPI void instance_extra_info_updated_by_instance(struct inst_info *inst) (void)CLIENT_SEND_EVENT(inst, packet); } -HAPI void instance_dbox_updated_by_instance(struct inst_info *inst, const char *safe_file) +HAPI void instance_dbox_updated_by_instance(struct inst_info *inst, const char *safe_file, int x, int y, int w, int h) { struct packet *packet; const char *id = NULL; @@ -1864,9 +1864,9 @@ HAPI void instance_dbox_updated_by_instance(struct inst_info *inst, const char * id = buffer_handler_id(inst->dbox.canvas.buffer); } - packet = packet_create_noack((const char *)&cmd, "ssssii", + packet = packet_create_noack((const char *)&cmd, "ssssiiii", package_name(inst->info), inst->id, id, safe_file, - inst->dbox.width, inst->dbox.height); + x, y, w, h); if (!packet) { ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id); return; @@ -1895,7 +1895,7 @@ HAPI int instance_hold_scroll(struct inst_info *inst, int hold) return CLIENT_SEND_EVENT(inst, packet); } -HAPI void instance_gbar_updated_by_instance(struct inst_info *inst, const char *descfile) +HAPI void instance_gbar_updated_by_instance(struct inst_info *inst, const char *descfile, int x, int y, int w, int h) { struct packet *packet; unsigned int cmd = CMD_GBAR_UPDATED; @@ -1942,9 +1942,9 @@ HAPI void instance_gbar_updated_by_instance(struct inst_info *inst, const char * break; } - packet = packet_create_noack((const char *)&cmd, "ssssii", + packet = packet_create_noack((const char *)&cmd, "ssssiiii", package_name(inst->info), inst->id, descfile, id, - inst->gbar.width, inst->gbar.height); + x, y, w, h); if (!packet) { ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id); return; @@ -1953,7 +1953,7 @@ HAPI void instance_gbar_updated_by_instance(struct inst_info *inst, const char * (void)CLIENT_SEND_EVENT(inst, packet); } -HAPI void instance_gbar_updated(const char *pkgname, const char *id, const char *descfile) +HAPI void instance_gbar_updated(const char *pkgname, const char *id, const char *descfile, int x, int y, int w, int h) { struct inst_info *inst; @@ -1962,7 +1962,7 @@ HAPI void instance_gbar_updated(const char *pkgname, const char *id, const char return; } - instance_gbar_updated_by_instance(inst, descfile); + instance_gbar_updated_by_instance(inst, descfile, x, y, w, h); } HAPI int instance_set_update_mode(struct inst_info *inst, int active_update) @@ -3211,7 +3211,7 @@ HAPI int instance_client_gbar_created(struct inst_info *inst, int status) if (inst->gbar.need_to_send_close_event && inst->gbar.pended_update_cnt) { DbgPrint("Apply pended desc(%d) - %s\n", inst->gbar.pended_update_cnt, inst->gbar.pended_update_desc); - instance_gbar_updated_by_instance(inst, inst->gbar.pended_update_desc); + instance_gbar_updated_by_instance(inst, inst->gbar.pended_update_desc, 0, 0, inst->gbar.width, inst->gbar.height); inst->gbar.pended_update_cnt = 0; DbgFree(inst->gbar.pended_update_desc); inst->gbar.pended_update_desc = NULL; diff --git a/src/script_handler.c b/src/script_handler.c index 09615f6..7075c6f 100644 --- a/src/script_handler.c +++ b/src/script_handler.c @@ -388,7 +388,7 @@ static int render_post_cb(void *_buffer_handle, void *data) info = instance_dbox_script(inst); if (info && info == data) { buffer_handler_flush(buffer_handle); - instance_dbox_updated_by_instance(inst, NULL); + instance_dbox_updated_by_instance(inst, NULL, info->x, info->y, info->w, info->h); PERF_MARK("lb,update"); return DBOX_STATUS_ERROR_NONE; } @@ -396,7 +396,7 @@ static int render_post_cb(void *_buffer_handle, void *data) info = instance_gbar_script(inst); if (info && info == data) { buffer_handler_flush(buffer_handle); - instance_gbar_updated_by_instance(inst, NULL); + instance_gbar_updated_by_instance(inst, NULL, info->x, info->y, info->w, info->h); PERF_MARK("pd,update"); return DBOX_STATUS_ERROR_NONE; } @@ -1187,7 +1187,6 @@ static Eina_Bool apply_changes_cb(void *_data) } #endif - HAPI int script_handler_parse_desc(struct inst_info *inst, const char *filename, int is_pd) { PERF_INIT(); diff --git a/src/server.c b/src/server.c index 4a70f0f..aeda46e 100644 --- a/src/server.c +++ b/src/server.c @@ -6585,6 +6585,8 @@ static struct packet *slave_updated(pid_t pid, int handle, const struct packet * const char *id; int w; int h; + int x; + int y; int ret; struct inst_info *inst; @@ -6594,8 +6596,8 @@ static struct packet *slave_updated(pid_t pid, int handle, const struct packet * goto out; } - ret = packet_get(packet, "sssii", &pkgname, &id, &safe_filename, &w, &h); - if (ret != 5) { + ret = packet_get(packet, "sssiiii", &pkgname, &id, &safe_filename, &x, &y, &w, &h); + if (ret != 7) { ErrPrint("Parameter is not matched\n"); goto out; } @@ -6627,8 +6629,7 @@ static struct packet *slave_updated(pid_t pid, int handle, const struct packet * * \check * text format (inst) */ - instance_set_dbox_size(inst, w, h); - instance_dbox_updated_by_instance(inst, safe_filename); + instance_dbox_updated_by_instance(inst, safe_filename, x, y, w, h); break; } @@ -6679,6 +6680,10 @@ static struct packet *slave_desc_updated(pid_t pid, int handle, const struct pac const char *pkgname; const char *id; const char *descfile; + int x; + int y; + int w; + int h; int ret; struct inst_info *inst; @@ -6688,8 +6693,8 @@ static struct packet *slave_desc_updated(pid_t pid, int handle, const struct pac goto out; } - ret = packet_get(packet, "sss", &pkgname, &id, &descfile); - if (ret != 3) { + ret = packet_get(packet, "sssiiii", &pkgname, &id, &descfile, &x, &y, &w, &h); + if (ret != 7) { ErrPrint("Parameter is not matched\n"); goto out; } @@ -6714,7 +6719,7 @@ static struct packet *slave_desc_updated(pid_t pid, int handle, const struct pac case GBAR_TYPE_TEXT: instance_set_gbar_size(inst, 0, 0); case GBAR_TYPE_BUFFER: - instance_gbar_updated(pkgname, id, descfile); + instance_gbar_updated(pkgname, id, descfile, x, y, w, h); break; default: DbgPrint("Ignore updated DESC(%s)\n", pkgname); -- 2.7.4