add a -threads mode and make non-threaded compile the default... no
authorraster <raster>
Thu, 24 May 2012 03:59:02 +0000 (03:59 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 24 May 2012 03:59:02 +0000 (03:59 +0000)
pending threads then. we can change this later for more testing.
trying to narrow down issues anyway.

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@71378 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/bin/edje_cc.c
src/bin/edje_cc.h
src/bin/edje_cc_out.c

index f2663be..4e06457 100644 (file)
@@ -30,6 +30,7 @@ int        no_save = 0;
 int        min_quality = 0;
 int        max_quality = 100;
 int        compress_mode = EET_COMPRESSION_DEFAULT;
+int        threads = 0;
 
 static void
 main_help(void)
@@ -55,6 +56,7 @@ main_help(void)
       "-Ddefine_val=to          CPP style define to define input macro definitions to the .edc source\n"
       "-fastcomp                Use a faster compression algorithm (LZ4) (mutually exclusive with -fastdecomp)\n"
       "-fastdecomp              Use a faster decompression algorithm (LZ4HC) (mutually exclusive with -fastcomp)\n"
+      "-threads                 Compile the edje file using multiple parallel threads\n"
       ,progname);
 }
 
@@ -147,14 +149,18 @@ main(int argc, char **argv)
             if (max_quality < 0) max_quality = 0;
             if (max_quality > 100) max_quality = 100;
          }
-       else if ((!strcmp(argv[i], "-fastcomp")) && (i < (argc - 1)))
+       else if (!strcmp(argv[i], "-fastcomp"))
          {
              compress_mode = EET_COMPRESSION_SUPERFAST;
          }
-       else if ((!strcmp(argv[i], "-fastdecomp")) && (i < (argc - 1)))
+       else if (!strcmp(argv[i], "-fastdecomp"))
          {
              compress_mode = EET_COMPRESSION_VERYFAST;
          }
+       else if (!strcmp(argv[i], "-threads"))
+         {
+             threads = 1;
+         }
        else if (!strncmp(argv[i], "-D", 2))
          {
             defines = eina_list_append(defines, mem_strdup(argv[i]));
index 35fcf5d..5683feb 100644 (file)
@@ -228,5 +228,6 @@ extern Eina_List             *aliases;
 extern New_Object_Handler     object_handlers[];
 extern New_Statement_Handler  statement_handlers[];
 extern int                    compress_mode;
+extern int                    threads;
 
 #endif
index b0ab4d8..33e34be 100644 (file)
@@ -178,7 +178,6 @@ struct _Group_Write
 };
 
 static int pending_threads = 0;
-int threads = 1;
 
 static void data_process_string(Edje_Part_Collection *pc, const char *prefix, char *s, void (*func)(Edje_Part_Collection *pc, char *name, char* ptr, int len));