Remove forceProcess and forceUpdate flag 31/293031/2
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 18 May 2023 08:30:03 +0000 (17:30 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 22 May 2023 00:08:18 +0000 (00:08 +0000)
We don't need them now because we change to process events regardless of state

Change-Id: I0416a79c4fdbb8aa12b2be5cabeb3da525216a6c

automated-tests/src/dali/dali-test-suite-utils/test-render-controller.cpp
automated-tests/src/dali/dali-test-suite-utils/test-render-controller.h
dali/integration-api/render-controller.h
dali/internal/common/core-impl.cpp
dali/internal/common/core-impl.h
dali/internal/event/common/event-thread-services.h
dali/internal/event/events/gesture-event-processor.cpp
dali/internal/event/rendering/texture-impl.cpp
dali/internal/event/size-negotiation/relayout-controller-impl.cpp
dali/internal/update/queue/update-message-queue.cpp

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 f337dd6..ccb5dd6 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_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.
@@ -41,14 +41,14 @@ public:
    * Multi-threading note: this method will be called from the main thread only.
    * @param[in] forceUpdate true to update forcely.
    */
-  virtual void RequestUpdate(bool forceUpdate) = 0;
+  virtual void RequestUpdate() = 0;
 
   /**
    * Requests a future call to Dali::Integration::Core::ProcessEvents(), when the application is idle.
    * Multi-threading note: this method will be called from the main thread only.
    * @param[in] forceProcess true to process events forcely.
    */
-  virtual void RequestProcessEventsOnIdle(bool forceProcess) = 0;
+  virtual void RequestProcessEventsOnIdle() = 0;
 };
 
 } // namespace Integration
index 44f193b..34836e5 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2022 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.
@@ -89,7 +89,6 @@ Core::Core(RenderController&                   renderController,
   mPlatform(platform),
   mGraphicsController(graphicsController),
   mProcessingEvent(false),
-  mForceNextUpdate(false),
   mProcessorUnregistered(false),
   mPostProcessorUnregistered(false)
 {
@@ -265,7 +264,7 @@ void Core::ProcessEvents()
   if(mProcessingEvent)
   {
     DALI_LOG_ERROR("ProcessEvents should not be called from within ProcessEvents!\n");
-    mRenderController.RequestProcessEventsOnIdle(false);
+    mRenderController.RequestProcessEventsOnIdle();
     return;
   }
 
@@ -313,13 +312,11 @@ void Core::ProcessEvents()
 
   // Check if the touch or gestures require updates.
   const bool gestureNeedsUpdate = mGestureEventProcessor->NeedsUpdate();
-  // Check if the next update is forced.
-  const bool forceUpdate = IsNextUpdateForced();
 
-  if(messagesToProcess || gestureNeedsUpdate || forceUpdate)
+  if(messagesToProcess || gestureNeedsUpdate)
   {
     // tell the render controller to keep update thread running
-    mRenderController.RequestUpdate(forceUpdate);
+    mRenderController.RequestUpdate();
   }
 
   mRelayoutController->SetProcessingCoreEvents(false);
@@ -592,18 +589,6 @@ BufferIndex Core::GetEventBufferIndex() const
   return mUpdateManager->GetEventBufferIndex();
 }
 
-void Core::ForceNextUpdate()
-{
-  mForceNextUpdate = true;
-}
-
-bool Core::IsNextUpdateForced()
-{
-  bool nextUpdateForced = mForceNextUpdate;
-  mForceNextUpdate      = false;
-  return nextUpdateForced;
-}
-
 } // namespace Internal
 
 } // namespace Dali
index ba7b74b..3aea733 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_CORE_H
 
 /*
- * Copyright (c) 2022 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.
@@ -233,16 +233,6 @@ public: // Implementation of EventThreadServices
    */
   BufferIndex GetEventBufferIndex() const override;
 
-  /**
-   * @copydoc EventThreadServices::ForceNextUpdate
-   */
-  void ForceNextUpdate() override;
-
-  /**
-   * @copydoc EventThreadServices::IsNextUpdateForced
-   */
-  bool IsNextUpdateForced() override;
-
 private:
   /**
    * Run each registered processor
@@ -362,7 +352,6 @@ private:
   Graphics::Controller& mGraphicsController;
 
   bool mProcessingEvent : 1;           ///< True during ProcessEvents()
-  bool mForceNextUpdate : 1;           ///< True if the next rendering is really required.
   bool mProcessorUnregistered : 1;     ///< True if the processor is unregistered during RunProcessors()
   bool mPostProcessorUnregistered : 1; ///< True if the post-processor is unregistered during RunPostProcessors()
 
index f2c6ae7..758e940 100644 (file)
@@ -103,18 +103,6 @@ public:
   virtual BufferIndex GetEventBufferIndex() const = 0;
 
   /**
-   * @brief Indicate that the next rendering is really required.
-   */
-  virtual void ForceNextUpdate() = 0;
-
-  /**
-   * @brief Check if the next rendering is really required.
-   *
-   * @return true if the next rendering is really required.
-   */
-  virtual bool IsNextUpdateForced() = 0;
-
-  /**
    * @return true if core is still running and we can send messages
    * @note It returns false if it is called from a thread other than the main thread.
    */
index 260170f..2ca9caf 100644 (file)
@@ -187,7 +187,7 @@ void GestureEventProcessor::SetGestureProperties(const Dali::Gesture& gesture)
   if(mPanGestureProcessor.SetPanGestureProperties(pan))
   {
     // We may not be updating so we need to ask the render controller for an update.
-    mRenderController.RequestUpdate(false);
+    mRenderController.RequestUpdate();
   }
 }
 
index 3a0fd17..c8a69b2 100644 (file)
@@ -40,10 +40,6 @@ TexturePtr Texture::New(NativeImageInterface& nativeImageInterface)
 {
   TexturePtr texture(new Texture(&nativeImageInterface));
   texture->Initialize();
-
-  // Request event processing and update forcely.
-  texture->mEventThreadServices.GetRenderController().RequestProcessEventsOnIdle(true);
-  texture->mEventThreadServices.ForceNextUpdate();
   return texture;
 }
 
@@ -201,10 +197,6 @@ bool Texture::UploadSubPixelData(PixelDataPtr pixelData,
                                    static_cast<uint16_t>(height)};
             UploadTextureMessage(mEventThreadServices.GetUpdateManager(), mTextureKey, pixelData, params);
 
-            // Request event processing and update forcely
-            mEventThreadServices.GetRenderController().RequestProcessEventsOnIdle(true);
-            mEventThreadServices.ForceNextUpdate();
-
             result = true;
           }
         }
index 2d639f5..4f333de 100644 (file)
@@ -203,7 +203,7 @@ void RelayoutController::RequestRelayout(Dali::Actor& actor, Dimension::Type dim
 
   if(!mProcessingCoreEvents)
   {
-    mRenderController.RequestProcessEventsOnIdle(false);
+    mRenderController.RequestProcessEventsOnIdle();
   }
 }
 
index 6f24a68..b814715 100644 (file)
@@ -189,7 +189,7 @@ uint32_t* MessageQueue::ReserveMessageSlot(uint32_t requestedSize, bool updateSc
   // If we are outside, then we have to request a call to Core::ProcessEvents() on idle.
   if(false == mImpl->processingEvents)
   {
-    mImpl->renderController.RequestProcessEventsOnIdle(false);
+    mImpl->renderController.RequestProcessEventsOnIdle();
   }
 
   return mImpl->currentMessageBuffer->ReserveMessageSlot(requestedSize);