[WRTjs][VD] Move boost down thread logic after suspend 20/315320/3
authorliwei90727 <wei90727.li@samsung.com>
Sat, 30 Nov 2024 02:18:39 +0000 (10:18 +0800)
committerBot Blink <blinkbot@samsung.com>
Mon, 2 Dec 2024 05:16:40 +0000 (05:16 +0000)
Follow legacy logic, move boost down thread logic after suspend,
legacy logis is SuspendResumeBooster::Suspend(), so move from
visibility hidden to suspend.

Change-Id: Ie710f9bc3ad535489f8f95cf565dd81c9b5d256a
Signed-off-by: liwei90727 <wei90727.li@samsung.com>
wrt/src/app/tv/ui_runtime_tv.cc
wrt/src/browser/tv/wrt_native_window_tv.cc

index db0b6ed8892394677c9abfa735682900a3fe4b78..d1774bba3db7e643c5201a0f02b35b2ec721c926 100644 (file)
@@ -10,6 +10,9 @@
 #include "wrt/src/browser/tv/wrt_native_window_tv.h"
 #include "wrt/src/common/application_data.h"
 #include "wrt/src/common/locale_manager.h"
+#if defined(THREAD_BOOSTER_SERVICE)
+#include "wrt/src/common/tv/wrt_thread_booster.h"
+#endif
 
 namespace wrt {
 
@@ -37,6 +40,9 @@ void UiRuntimeTV::OnTerminate() {
 void UiRuntimeTV::OnPause() {
   UiRuntime::OnPause();
   WidgetStateProvider::OnStatusChanged("pause");
+#if defined(THREAD_BOOSTER_SERVICE)
+  WRT_thread_booster::GetInstance()->BoostDownRegisteredThreads();
+#endif
 }
 
 void UiRuntimeTV::OnResume() {
index d4a7226260fb6c463bbfb507d5095cf120eea8e9..a9e66c105b29658ee073d4e9d21704957e0c8e27 100644 (file)
@@ -1419,8 +1419,6 @@ void WRTNativeWindowTV::SetPageVisibility(bool visible) {
 #if defined(THREAD_BOOSTER_SERVICE)
   if (visible) {
     WRT_thread_booster::GetInstance()->BoostUpRegisteredThreads();
-  } else {
-    WRT_thread_booster::GetInstance()->BoostDownRegisteredThreads();
   }
 #endif