summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Maw <jonathan.maw@codethink.co.uk>2016-02-24 15:01:11 +0000
committerJonathan Maw <jonathan.maw@codethink.co.uk>2016-02-26 13:16:05 +0000
commitf7072c3e4e0681123e9fce90dbcccb49e42275a4 (patch)
tree9049c2e50c6a9746ae4945f73264151721426adb
parentc4fea64f90ee7078caba4b8080928e5d11f33b4a (diff)
downloadgenivi-demo-platform-hmi-f7072c3e4e0681123e9fce90dbcccb49e42275a4.tar.gz
Set surface source rectangle as well as destinationjonathanmaw/weston19-rebase
With wayland-ivi-extension 1.9, it is now necessary to set the source rectangle in conjunction with the destination rectangle.
-rw-r--r--src/gdp-hmi-controller.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gdp-hmi-controller.cpp b/src/gdp-hmi-controller.cpp
index bb7307c..023b0d6 100644
--- a/src/gdp-hmi-controller.cpp
+++ b/src/gdp-hmi-controller.cpp
@@ -334,6 +334,7 @@ static void launcher_show(const struct gdp_surface_context gdp_surface)
t_ilm_layer layerIdArray[] = {GDP_LAUNCHER_LAYER_ID};
t_ilm_string* seats;
t_ilm_uint seat_count;
+ struct ilmSurfaceProperties props;
sd_journal_print(LOG_DEBUG, "launcher_show"
"(surface = %u, layer = %u)\n",
@@ -341,6 +342,10 @@ static void launcher_show(const struct gdp_surface_context gdp_surface)
surfaceIdArray[0] = gdp_surface.id_surface;
layerIdArray[0] = gdp_surface.id_layer;
+ callResult = ilm_getPropertiesOfSurface(gdp_surface.id_surface, &props);
+ callResult = ilm_surfaceSetSourceRectangle(
+ gdp_surface.id_surface, 0, 0,
+ props.origSourceWidth, props.origSourceHeight);
callResult = ilm_surfaceSetDestinationRectangle(
gdp_surface.id_surface, 0, 0, screenWidth, screenHeight);
callResult = ilm_surfaceSetVisibility(
@@ -404,6 +409,7 @@ void surface_control(const int index)
GDP_PANEL_LAYER_ID};
t_ilm_string* seats;
t_ilm_uint seat_count;
+ struct ilmSurfaceProperties props;
sd_journal_print(LOG_DEBUG, "surface_control - index = %d"
"(surface = %u, layer = %u)\n",
@@ -415,6 +421,11 @@ void surface_control(const int index)
switch(gdp_surface.id_surface) {
case GDP_PANEL_SURFACE_ID: // Panel
+ callResult = ilm_getPropertiesOfSurface(
+ gdp_surface.id_surface, &props);
+ callResult = ilm_surfaceSetSourceRectangle(
+ gdp_surface.id_surface, 0, 0,
+ props.origSourceWidth, props.origSourceHeight);
callResult = ilm_surfaceSetDestinationRectangle(
gdp_surface.id_surface, 0, 0, screenWidth, panelHeight);
callResult = ilm_surfaceSetVisibility(
@@ -455,6 +466,11 @@ void surface_control(const int index)
case MOCK_NAVIGATION_SURFACE_ID: // EGL Mock Navigation
// fall-through
case INPUT_EVENT_EXAMPLE_SURFACE_ID: // EGL Input Example
+ callResult = ilm_getPropertiesOfSurface(
+ gdp_surface.id_surface, &props);
+ callResult = ilm_surfaceSetSourceRectangle(
+ gdp_surface.id_surface, 0, 0,
+ props.origSourceWidth, props.origSourceHeight);
callResult = ilm_surfaceSetDestinationRectangle(
gdp_surface.id_surface, 0, 0, screenWidth,
screenHeight - panelHeight);