summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-09-19 10:23:26 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-10-28 12:16:54 +0900
commit1f79dfc334418b95f82afac528d70cc5749cf2ef (patch)
tree1d67f949042e689754beedd037b6149b24cff493
parent9476e1c02025f6acfea15c8e452bea73b73f4c22 (diff)
downloadweston-1f79dfc334418b95f82afac528d70cc5749cf2ef.tar.gz
ivi-layout: fix calculation of view scale.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-rw-r--r--ivi-shell/ivi-layout-export.h1
-rw-r--r--ivi-shell/ivi-layout.c17
2 files changed, 15 insertions, 3 deletions
diff --git a/ivi-shell/ivi-layout-export.h b/ivi-shell/ivi-layout-export.h
index f0654f1f..f24fa994 100644
--- a/ivi-shell/ivi-layout-export.h
+++ b/ivi-shell/ivi-layout-export.h
@@ -67,6 +67,7 @@ enum ivi_layout_notification_mask {
IVI_NOTIFICATION_PIXELFORMAT = (1 << 8),
IVI_NOTIFICATION_ADD = (1 << 9),
IVI_NOTIFICATION_REMOVE = (1 << 10),
+ IVI_NOTIFICATION_CONFIGURE = (1 << 11),
IVI_NOTIFICATION_ALL = 0xFFFF
};
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index f7789635..5a46d479 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -2957,18 +2957,29 @@ ivi_layout_surfaceConfigure(struct ivi_layout_surface *ivisurf,
int32_t width, int32_t height)
{
struct ivi_layout *layout = get_instance();
-
+ int32_t in_init = 0;
ivisurf->surface->width_from_buffer = width;
ivisurf->surface->height_from_buffer = height;
if (ivisurf->prop.sourceWidth == 0 || ivisurf->prop.sourceHeight == 0) {
+ in_init = 1;
+ }
+
+ /* FIXME: when sourceHeight/Width is used as clipping range in image buffer */
+ /* if (ivisurf->prop.sourceWidth == 0 || ivisurf->prop.sourceHeight == 0) { */
ivisurf->pending.prop.sourceWidth = width;
ivisurf->pending.prop.sourceHeight = height;
ivisurf->prop.sourceWidth = width;
ivisurf->prop.sourceHeight = height;
- }
+ /* } */
+
+ ivisurf->event_mask |= IVI_NOTIFICATION_CONFIGURE;
- wl_signal_emit(&layout->surface_notification.configure_changed, ivisurf);
+ if (in_init) {
+ wl_signal_emit(&layout->surface_notification.configure_changed, ivisurf);
+ } else {
+ ivi_layout_commitChanges();
+ }
}
static int32_t