Fix source size 0 sometimes
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>
Mon, 5 Nov 2018 08:59:21 +0000 (17:59 +0900)
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>
Mon, 5 Nov 2018 08:59:25 +0000 (17:59 +0900)
deploy.sh
policy_manager/config/roles.json.zipc.split
src/window_manager.cpp
src/wm_layer_control.cpp

index de4ac34..173be29 100755 (executable)
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,9 +1,11 @@
 #!/bin/bash
 cd build
-source /opt/agl-sdk/6.0.0-aarch64/environment-setup-aarch64-agl-linux
+source /opt/agl-sdk/6.0.0_toyota-special/environment-setup-aarch64-agl-linux
 make package
-scp package/windowmanager-service-2017.wgt root@192.168.200.45:~
-ssh root@192.168.200.45 afm-util remove  windowmanager-service-2017@0.1
-ssh root@192.168.200.45 afm-util install windowmanager-service-2017.wgt
-ssh root@192.168.200.45 sync
-ssh root@192.168.200.45 reboot
+if [ $? -eq 0 ]; then
+  scp package/windowmanager-service-2017.wgt root@${1}:~
+  ssh root@${1} afm-util remove  windowmanager-service-2017@0.1
+  ssh root@${1} afm-util install windowmanager-service-2017.wgt
+  ssh root@${1} sync
+  ssh root@${1} reboot
+fi
\ No newline at end of file
index ba5505b..e21e961 100644 (file)
                 },
                 {
                     "category": "general",
-                    "role": "launcher | browser | debug | fallback",
+                    "role": "launcher | browser | debug | settings | hvac | dashboard | fallback",
                     "area": "normal.full",
                     "description": "For split test, video and music are moved to category:splitable",
                     "layer": "apps",
                 },
                 {
                     "category": "splitable_main",
-                    "role": "settings | mixer | hvac | video | phone | dashboard",
+                    "role": "mixer | video | phone",
                     "area": "split.main",
                     "description": "For split test, video and music are included here",
                     "layer": "apps",
@@ -98,7 +98,7 @@
                 },
                 {
                     "category": "splitable",
-                    "role": "video | music | sdl | eb",
+                    "role": "video | music | sdl | webbrowser | eb",
                     "area": "normal.full | split.main | split.sub",
                     "description": "For split test, video and music are included here",
                     "layer": "apps",
index 31caebf..f209f12 100644 (file)
@@ -227,6 +227,12 @@ result<int> WindowManager::api_request_surface(char const *appid, char const *dr
         auto id = int(this->id_alloc.generate_id(role));
         this->tmp_surface2app[id] = {s_appid, 0};
 
+        // Work Around
+        HMI_NOTICE("WORK AROUND: add surface on request surface");
+        auto client = g_app_list.lookUpClient(s_appid);
+        client->addSurface(id);
+        ///////////////
+
         // Set role map of (new, old)
         this->rolenew2old[role] = string(drawing_name);
 
index 10e99b9..80dc0c9 100644 (file)
@@ -554,7 +554,19 @@ WMError LayerControl::layoutChange(const WMAction& action)
 
     auto rect = this->getAreaSize(action.area);
     HMI_DEBUG("Set layout %d, %d, %d, %d",rect.x, rect.y, rect.w, rect.h);
-    ilm_commitChanges();
+
+    // TO BE FIXED:
+    // Sometimes, ivi_wm_surface_size signal doesn't reach window manager,
+    // then, Window Manager can't set source size.
+    // This fixes it but it takes about 200ns(on R-Car M3) wastefully
+    ilmSurfaceProperties sp;
+    ilm_getPropertiesOfSurface(surface, &sp);
+    if(sp.origSourceHeight != sp.sourceHeight) {
+        HMI_SEQ_NOTICE(action.req_num, "WORK AROUND: set source size w:%d h%d", sp.origSourceWidth, sp.origSourceHeight);
+        ilm_surfaceSetSourceRectangle(surface, 0, 0, sp.origSourceWidth, sp.origSourceHeight);
+        ilm_commitChanges();
+    }
+
     ilm_surfaceSetDestinationRectangle(surface, rect.x, rect.y, rect.w, rect.h);
     ilm_commitChanges();
     for(auto &wm_layer: this->wm_layers)