summaryrefslogtreecommitdiff
path: root/src/bin/evas/evas_cserve2_shm_debug.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2013-09-06 11:53:28 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2013-10-28 15:47:15 +0900
commit0d506a7b7369aad8376336497e755092cbe8cb40 (patch)
tree87c6926fafb4ddef6c6ca45352dc4292ddba61d5 /src/bin/evas/evas_cserve2_shm_debug.c
parent85cd382725ab877a62d935d9fb37368d4b868f59 (diff)
evas/cserve2: Fix images indexing (File_Entry stuff)
High-level problem: cserve2 does not support load_opts properly when opening an image. As a result, when (pre)loading a JPEG file with specific load options (eg. w, h, region and orientation), the image buffer might have the wrong dimensions. So, we need to use load_opts when computing file hash key. And, pass these load options to the loader slave, and use them while OPENING the image. This will set properly the geometry. Fixes test "Preload and Prescale" in elementary_test.
Diffstat (limited to '')
-rw-r--r--src/bin/evas/evas_cserve2_shm_debug.c52
1 files changed, 49 insertions, 3 deletions
diff --git a/src/bin/evas/evas_cserve2_shm_debug.c b/src/bin/evas/evas_cserve2_shm_debug.c
index 882864618e..12ee29dd55 100644
--- a/src/bin/evas/evas_cserve2_shm_debug.c
+++ b/src/bin/evas/evas_cserve2_shm_debug.c
@@ -384,7 +384,7 @@ _strings_all_print(Eina_Bool full)
384} 384}
385 385
386static void 386static void
387_files_all_print(Eina_Bool full) 387_files_all_print_short()
388{ 388{
389 int k; 389 int k;
390 390
@@ -401,7 +401,7 @@ _files_all_print(Eina_Bool full)
401 401
402 fd = _shared_array_item_get(sf_files, k); 402 fd = _shared_array_item_get(sf_files, k);
403 if (!fd) break; 403 if (!fd) break;
404 if (!fd->id || (!full && !fd->refcount)) continue; 404 if (!fd->id || !fd->refcount) continue;
405 405
406 printf("%7d %7d %5dx%-6d %d %d %6.6s %6d %6d '%s':'%s'\n", 406 printf("%7d %7d %5dx%-6d %d %d %6.6s %6d %6d '%s':'%s'\n",
407 k, fd->id, fd->w, fd->h, !!fd->alpha, !!fd->invalid, 407 k, fd->id, fd->w, fd->h, !!fd->alpha, !!fd->invalid,
@@ -414,6 +414,51 @@ _files_all_print(Eina_Bool full)
414} 414}
415 415
416static void 416static void
417_files_all_print_all(void)
418{
419 int k;
420
421 if (!sf_files) return;
422
423 printf("List of opened image files: %s\n", eina_file_filename_get(sf_files->f));
424 printf_newline(0);
425
426 for (k = 0; k < sf_files->header->count; k++)
427 {
428 File_Data *fd;
429
430 fd = _shared_array_item_get(sf_files, k);
431 if (!fd) break;
432 if (!fd->id) continue;
433
434 printf("File #%-8d %d\n", k, fd->id);
435 printf("Path:Key: '%s':'%s'\n",
436 _shared_string_get(fd->path), _shared_string_get(fd->key));
437 printf("LoadOpts: Region: %d,%d-%dx%d\n",
438 fd->lo.region.x, fd->lo.region.y, fd->lo.region.w, fd->lo.region.h);
439 if (fd->lo.dpi != 0)
440 printf(" DPI: %f\n");
441 else
442 printf(" DPI: 0\n");
443 printf(" Requested: %dx%d\n", fd->lo.w, fd->lo.h);
444 printf(" Scale down: %d\n", fd->lo.scale_down_by);
445 printf(" Orientation: %s\n", fd->lo.orientation ? "YES" : "NO");
446 printf("Loader: %s\n", _shared_string_get(fd->loader_data));
447 printf("Geometry: %dx%d\n", fd->w, fd->h);
448 printf("Animation: anim: %s, frames: %d, loop: %d, hint: %d\n",
449 fd->animated ? "YES" : "NO",
450 fd->frame_count, fd->loop_count, fd->loop_hint);
451 printf("Alpha: %s\n", fd->alpha ? "YES" : "NO");
452 printf("Invalid: %s\n", fd->invalid ? "YES" : "NO");
453
454 printf_newline(0);
455 }
456
457 printf("\n\n");
458 fflush(stdout);
459}
460
461static void
417_images_all_print_short(void) 462_images_all_print_short(void)
418{ 463{
419 int k; 464 int k;
@@ -752,7 +797,8 @@ main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
752 797
753 _index_tables_summary_print(); 798 _index_tables_summary_print();
754 _strings_all_print(full); 799 _strings_all_print(full);
755 _files_all_print(full); 800 _files_all_print_short();
801 if (full) _files_all_print_all();
756 _images_all_print_short(); 802 _images_all_print_short();
757 if (full) _images_all_print_full(); 803 if (full) _images_all_print_full();
758 _fonts_all_print_short(); 804 _fonts_all_print_short();