/*
- * 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.
{
}
-void TestRenderController::RequestUpdate(bool forceUpdate)
+void TestRenderController::RequestUpdate()
{
mRequestUpdateCalled = true;
}
-void TestRenderController::RequestProcessEventsOnIdle(bool forceProcess)
+void TestRenderController::RequestProcessEventsOnIdle()
{
mRequestProcessEventsOnIdleCalled = true;
}
#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.
TestRenderController();
~TestRenderController() override;
- void RequestUpdate(bool forceUpdate) override;
- void RequestProcessEventsOnIdle(bool forceProcess) override;
+ void RequestUpdate() override;
+ void RequestProcessEventsOnIdle() override;
typedef enum
{
#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.
* 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
/*
- * 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.
mPlatform(platform),
mGraphicsController(graphicsController),
mProcessingEvent(false),
- mForceNextUpdate(false),
mProcessorUnregistered(false),
mPostProcessorUnregistered(false)
{
if(mProcessingEvent)
{
DALI_LOG_ERROR("ProcessEvents should not be called from within ProcessEvents!\n");
- mRenderController.RequestProcessEventsOnIdle(false);
+ mRenderController.RequestProcessEventsOnIdle();
return;
}
// 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);
return mUpdateManager->GetEventBufferIndex();
}
-void Core::ForceNextUpdate()
-{
- mForceNextUpdate = true;
-}
-
-bool Core::IsNextUpdateForced()
-{
- bool nextUpdateForced = mForceNextUpdate;
- mForceNextUpdate = false;
- return nextUpdateForced;
-}
-
} // namespace Internal
} // namespace Dali
#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.
*/
BufferIndex GetEventBufferIndex() const override;
- /**
- * @copydoc EventThreadServices::ForceNextUpdate
- */
- void ForceNextUpdate() override;
-
- /**
- * @copydoc EventThreadServices::IsNextUpdateForced
- */
- bool IsNextUpdateForced() override;
-
private:
/**
* Run each registered processor
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()
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
*/
static bool IsCoreRunning();
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();
}
}
{
TexturePtr texture(new Texture(&nativeImageInterface));
texture->Initialize();
-
- // Request event processing and update forcely.
- texture->mEventThreadServices.GetRenderController().RequestProcessEventsOnIdle(true);
- texture->mEventThreadServices.ForceNextUpdate();
return texture;
}
static_cast<uint16_t>(height)};
UploadTextureMessage(mEventThreadServices.GetUpdateManager(), *mRenderObject, pixelData, params);
- // Request event processing and update forcely
- mEventThreadServices.GetRenderController().RequestProcessEventsOnIdle(true);
- mEventThreadServices.ForceNextUpdate();
-
result = true;
}
}
if(!mProcessingCoreEvents)
{
- mRenderController.RequestProcessEventsOnIdle(false);
+ mRenderController.RequestProcessEventsOnIdle();
}
}
// 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);