From f499bc2e44c3db5dff812208ad6897e97db3d053 Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Mon, 19 Aug 2019 19:13:00 +0900 Subject: [PATCH] Fix the issue that splash screen is displayed late Due to 2sec delay timer, splash screen runs after 2sec. Fix it for splash screen to be displayed without delay if splash screen is active. Change-Id: I7b86a68563a87bd06f8f97b19a7f286cb247b1af Signed-off-by: jaekuk, lee --- runtime/browser/splash_screen.h | 1 + runtime/browser/web_application.cc | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/runtime/browser/splash_screen.h b/runtime/browser/splash_screen.h index bde989425..dc43fb314 100755 --- a/runtime/browser/splash_screen.h +++ b/runtime/browser/splash_screen.h @@ -39,6 +39,7 @@ class SplashScreen { std::shared_ptr ss_info, const std::string& app_path); void HideSplashScreen(HideReason reason); + bool IsActive() const { return is_active_; } private: std::pair GetDimensions(NativeWindow* window); diff --git a/runtime/browser/web_application.cc b/runtime/browser/web_application.cc index 1461b180f..b033d312c 100755 --- a/runtime/browser/web_application.cc +++ b/runtime/browser/web_application.cc @@ -1561,9 +1561,13 @@ void WebApplication::OnUsermediaPermissionRequest( void WebApplication::SetTimeoutFirstFrameDelay() { LOGGER(DEBUG); - firstframe_delay_timer_ = ecore_timer_add( - FirstFrameDelayWaitTime, - FirstFrameDelayTimerCallback, this); + if (splash_screen_->IsActive()) { + FirstFrameDelayTimerCallback(this); + } else { + firstframe_delay_timer_ = ecore_timer_add( + FirstFrameDelayWaitTime, + FirstFrameDelayTimerCallback, this); + } } Eina_Bool WebApplication::FirstFrameDelayTimerCallback(void* data) { -- 2.34.1