Parse the premultiplied_alpha value.
authorSung-jae Park <nicesj.park@samsung.com>
Mon, 14 Apr 2014 11:04:56 +0000 (20:04 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Mon, 14 Apr 2014 11:04:56 +0000 (20:04 +0900)
Change-Id: I5ac53f789b0bc6bf34d656972cce02496e7d76ec

include/conf.h
packaging/com.samsung.data-provider-slave.spec
src/conf.c

index 3576c13..f1e9d44 100644 (file)
@@ -83,6 +83,7 @@ struct conf {
        int overwrite_content;
        int com_core_thread;
        int use_xmonitor;
+       int premultiplied;
 };
 
 extern struct conf g_conf;
@@ -146,6 +147,7 @@ extern void conf_update_size(void);
 
 #define SLAVE_MAX_LOAD         g_conf.slave_max_load
 #define DEFAULT_PING_TIME      g_conf.ping_time
+#define PREMULTIPLIED_COLOR    g_conf.premultiplied
 
 #define MAX_ABI                256
 #define MAX_PKGNAME    512
index 94afb74..977816d 100644 (file)
@@ -2,7 +2,7 @@
 
 Name: com.samsung.data-provider-slave
 Summary: Plugin type livebox service provider
-Version: 0.13.3
+Version: 0.13.4
 Release: 1
 Group: HomeTF/Livebox
 License: Flora
index 1be4664..60688f6 100644 (file)
@@ -26,7 +26,7 @@
 #include "util.h"
 #include "debug.h"
 
-HAPI struct conf g_conf = {
+struct conf g_conf = {
        .width = 0,
        .height = 0,
 
@@ -92,6 +92,7 @@ HAPI struct conf g_conf = {
        .overwrite_content = 0,
        .com_core_thread = 1,
        .use_xmonitor = 1,
+       .premultiplied = 1,
 };
 
 HAPI void conf_update_size(void)
@@ -349,6 +350,15 @@ static void slave_max_loader(char *buffer)
        }
 }
 
+static void premultiplied_handler(char *buffer)
+{
+       if (sscanf(buffer, "%d", &g_conf.premultiplied) != 1) {
+               ErrPrint("Failed to parse the premultiplied color\n");
+       }
+
+       DbgPrint("Premultiplied: %d\n", g_conf.premultiplied);
+}
+
 HAPI int conf_loader(void)
 {
        FILE *fp;
@@ -509,6 +519,10 @@ HAPI int conf_loader(void)
                        .handler = input_path_handler,
                },
                {
+                       .name = "premultiplied",
+                       .handler = premultiplied_handler,
+               },
+               {
                        .name = NULL,
                        .handler = NULL,
                },