blob: d7f23a305ff42e1be68acf48723bfe8fbc01922a [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001From 05da7cf21de58425828099100358cddab67d2f6f Mon Sep 17 00:00:00 2001
2From: Jia Rong <jia.rong@mediatek.com>
3Date: Fri, 20 Apr 2018 10:49:48 +0800
4Subject: [PATCH 1/9] hmi-controller: use output_w/h instead of
5 current_mode_w/h
6
7make use of output->w/h instead of output->current_mode->w/h,
8output->w/h have involve factor of transform and scale
9Test: tesk ok
10
11Change-Id: Icd902acef813c1674020cf2af2352388539f9e37
12Signed-off-by: Jia Rong <jia.rong@mediatek.com>
13CR-Id: AUTO00016576
14---
15 ivi-shell/hmi-controller.c | 12 ++++++------
16 1 file changed, 6 insertions(+), 6 deletions(-)
17
18diff --git a/ivi-shell/hmi-controller.c b/ivi-shell/hmi-controller.c
19index 7b2f270..e47b499 100644
20--- a/ivi-shell/hmi-controller.c
21+++ b/ivi-shell/hmi-controller.c
22@@ -802,8 +802,8 @@ hmi_controller_create(struct weston_compositor *ec)
23 base_layer = MEM_ALLOC(1 * sizeof(struct hmi_controller_layer));
24 base_layer->x = 0;
25 base_layer->y = 0;
26- base_layer->width = output->current_mode->width;
27- base_layer->height = output->current_mode->height;
28+ base_layer->width = output->width;
29+ base_layer->height = output->height;
30 base_layer->id_layer =
31 hmi_ctrl->hmi_setting->base_layer_id +
32 (i * hmi_ctrl->hmi_setting->base_layer_id_offset);
33@@ -822,8 +822,8 @@ hmi_controller_create(struct weston_compositor *ec)
34 application_layer = MEM_ALLOC(1 * sizeof(struct hmi_controller_layer));
35 application_layer->x = 0;
36 application_layer->y = 0;
37- application_layer->width = output->current_mode->width;
38- application_layer->height = output->current_mode->height - panel_height;
39+ application_layer->width = output->width;
40+ application_layer->height = output->height - panel_height;
41 application_layer->id_layer =
42 hmi_ctrl->hmi_setting->application_layer_id +
43 (i * hmi_ctrl->hmi_setting->base_layer_id_offset);
44@@ -839,9 +839,9 @@ hmi_controller_create(struct weston_compositor *ec)
45 hmi_ctrl->workspace_background_layer.x = 0;
46 hmi_ctrl->workspace_background_layer.y = 0;
47 hmi_ctrl->workspace_background_layer.width =
48- output->current_mode->width;
49+ output->width;
50 hmi_ctrl->workspace_background_layer.height =
51- output->current_mode->height - panel_height;
52+ output->height - panel_height;
53
54 hmi_ctrl->workspace_background_layer.id_layer =
55 hmi_ctrl->hmi_setting->workspace_background_layer_id;
56--
571.9.1
58