[Tizen] Make Adaptor request event process regardless of state 64/293164/1
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 17 May 2023 09:23:06 +0000 (18:23 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 22 May 2023 04:22:09 +0000 (13:22 +0900)
We no longer check the adapter's state when requesting event process.

Change-Id: I64dab45b302284c71b9b911511f44eac70a0a677

automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-controller.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-render-controller.h
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h

index 1b90e0c..ae9dd7b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,12 +28,12 @@ TestRenderController::~TestRenderController()
 {
 }
 
-void TestRenderController::RequestUpdate(bool forceUpdate)
+void TestRenderController::RequestUpdate()
 {
   mRequestUpdateCalled = true;
 }
 
-void TestRenderController::RequestProcessEventsOnIdle(bool forceProcess)
+void TestRenderController::RequestProcessEventsOnIdle()
 {
   mRequestProcessEventsOnIdleCalled = true;
 }
index f7cafa4..2774df3 100644 (file)
@@ -2,7 +2,7 @@
 #define TEST_RENDER_CONTROLLER_H
 
 /*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -30,8 +30,8 @@ public:
   TestRenderController();
   ~TestRenderController() override;
 
-  void RequestUpdate(bool forceUpdate) override;
-  void RequestProcessEventsOnIdle(bool forceProcess) override;
+  void RequestUpdate() override;
+  void RequestProcessEventsOnIdle() override;
 
   typedef enum
   {
index cc68bcb..fc21e39 100644 (file)
@@ -938,7 +938,7 @@ void Adaptor::ProcessCoreEvents()
   }
 }
 
-void Adaptor::RequestUpdate(bool forceUpdate)
+void Adaptor::RequestUpdate()
 {
   switch(mState)
   {
@@ -950,11 +950,8 @@ void Adaptor::RequestUpdate(bool forceUpdate)
     case PAUSED:
     case PAUSED_WHILE_HIDDEN:
     {
-      if(forceUpdate)
-      {
-        // Update (and resource upload) without rendering
-        mThreadController->RequestUpdateOnce(UpdateMode::SKIP_RENDER);
-      }
+      // Update (and resource upload) without rendering
+      mThreadController->RequestUpdateOnce(UpdateMode::SKIP_RENDER);
       break;
     }
     default:
@@ -965,13 +962,13 @@ void Adaptor::RequestUpdate(bool forceUpdate)
   }
 }
 
-void Adaptor::RequestProcessEventsOnIdle(bool forceProcess)
+void Adaptor::RequestProcessEventsOnIdle()
 {
-  // Only request a notification if the Adaptor is actually running
-  // and we haven't installed the idle notification
-  if((!mNotificationOnIdleInstalled) && (RUNNING == mState || READY == mState || forceProcess))
+  // Only request a notification if we haven't installed the idle notification
+  // We want to run the processes even when paused
+  if(!mNotificationOnIdleInstalled && STOPPED != mState)
   {
-    mNotificationOnIdleInstalled = AddIdleEnterer(MakeCallback(this, &Adaptor::ProcessCoreEventsFromIdle), forceProcess);
+    mNotificationOnIdleInstalled = AddIdleEnterer(MakeCallback(this, &Adaptor::ProcessCoreEventsFromIdle), true);
   }
 }
 
@@ -1051,7 +1048,7 @@ void Adaptor::OnWindowHidden()
 void Adaptor::OnDamaged(const DamageArea& area)
 {
   // This is needed for the case where Dali window is partially obscured
-  RequestUpdate(false);
+  RequestUpdate();
 }
 
 void Adaptor::SurfaceResizePrepare(Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize)
index 1953055..844888d 100644 (file)
@@ -553,12 +553,12 @@ private: // From Dali::Integration::RenderController
   /**
    * @copydoc Dali::Integration::RenderController::RequestUpdate()
    */
-  void RequestUpdate(bool forceUpdate) override;
+  void RequestUpdate() override;
 
   /**
    * @copydoc Dali::Integration::RenderController::RequestProcessEventsOnIdle()
    */
-  void RequestProcessEventsOnIdle(bool forceProcess) override;
+  void RequestProcessEventsOnIdle() override;
 
 public: // From Dali::Internal::Adaptor::WindowVisibilityObserver
   /**