diff --git a/examples/frame-callback/frame-callback.cpp b/examples/frame-callback/frame-callback.cpp index 88c66f6..d1bf17f 100644 --- a/examples/frame-callback/frame-callback.cpp +++ b/examples/frame-callback/frame-callback.cpp @@ -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. @@ -37,7 +37,7 @@ void FrameCallback::AddId(uint32_t id) mActorIdContainer.PushBack(id); } -void FrameCallback::Update(Dali::UpdateProxy& updateProxy, float /* elapsedSeconds */) +bool FrameCallback::Update(Dali::UpdateProxy& updateProxy, float /* elapsedSeconds */) { // Go through Actor ID container and check if we've hit the sides. for(auto&& i : mActorIdContainer) @@ -67,4 +67,7 @@ void FrameCallback::Update(Dali::UpdateProxy& updateProxy, float /* elapsedSecon } } } + + // We don't need it to keep rendering. + return false; } diff --git a/examples/frame-callback/frame-callback.h b/examples/frame-callback/frame-callback.h index e41db59..7d6e335 100644 --- a/examples/frame-callback/frame-callback.h +++ b/examples/frame-callback/frame-callback.h @@ -2,7 +2,7 @@ #define DEMO_FRAME_CALLBACK_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. @@ -54,8 +54,9 @@ private: * @brief Called when every frame is updated. * @param[in] updateProxy Used to set the world-matrix and sizes. * @param[in] elapsedSeconds Time elapsed time since the last frame (in seconds) + * @return Whether we should keep rendering. */ - virtual void Update(Dali::UpdateProxy& updateProxy, float elapsedSeconds); + virtual bool Update(Dali::UpdateProxy& updateProxy, float elapsedSeconds); private: Dali::Vector mActorIdContainer; ///< Container of Actor IDs.