From c2888ff6aeec24b764c51f7f7c1581091cc36f82 Mon Sep 17 00:00:00 2001 From: Unsung Lee Date: Thu, 22 Jun 2023 19:23:32 +0900 Subject: [PATCH] plugin-api: resourced: Add window info into 'task_info' for LMK governor Add window information list in 'task_info'. Each window includes information such as visibility, focusing status, and coordinate for LMK governor resourced low memory killer (LMK) passes app information to LMK governor during LMK process. Sometimes, LMK governor needs to know window information of foreground app to prioritize which apps to be killed. This is because foreground app(s) are visible status. If visible app(s) are killed by LMK suddenly, then it embarrass the user. Change-Id: I6b7b4ae00ca95534e7d99ec8b412909038d2fdc6 Signed-off-by: Unsung Lee --- .../include/syscommon-plugin-resourced-memory-lmk.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h b/src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h index 49f257b..5f1a8b5 100644 --- a/src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h +++ b/src/plugin-api/resourced/include/syscommon-plugin-resourced-memory-lmk.h @@ -59,6 +59,25 @@ struct task_info { */ bool *proc_app_info_oom_killed; int proc_app_info_flags; + + /** + * TODO: A process can have more than one window, + * and an app can have more than one process. Therefore, + * a task_info can have more than one window. + */ + int window_pid; + int x; + int y; + int z; + int w; + int h; + int layer; + int opaque; + int visibility; + bool is_transformed; + bool alpha; + bool is_focused; + bool is_mapped; }; /** -- 2.7.4